Back to index

avfs  1.0.1
Classes | Defines | Functions
remote.h File Reference
#include "avfs.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  remdirent
struct  remhostpath
struct  remdirlist
struct  remgetparam
struct  remote

Defines

#define REM_LIST_SINGLE   (1 << 0)
#define REM_LIST_PARENT   (1 << 1)
#define REM_DIR_ONLY   (1 << 0)
#define REM_NOCASE   (1 << 1)

Functions

int av_remote_init (struct vmodule *module, struct remote *rem, struct avfs **resp)
void av_remote_add (struct remdirlist *dl, const char *name, const char *linkname, struct avstat *attr)

Class Documentation

struct remdirent

Definition at line 13 of file remote.h.

Class Members
char * linkname
char * name
struct remhostpath

Definition at line 19 of file remote.h.

Class Members
char * host
char * path
struct remdirlist

Definition at line 24 of file remote.h.

Collaboration diagram for remdirlist:
Class Members
struct remdirent * ents
int flags
avsize_t num
struct remgetparam

Definition at line 31 of file remote.h.

Class Members
void * data
char * localname

Define Documentation

#define REM_DIR_ONLY   (1 << 0)

Definition at line 37 of file remote.h.

#define REM_LIST_PARENT   (1 << 1)

Definition at line 11 of file remote.h.

#define REM_LIST_SINGLE   (1 << 0)

Definition at line 10 of file remote.h.

#define REM_NOCASE   (1 << 1)

Definition at line 38 of file remote.h.


Function Documentation

void av_remote_add ( struct remdirlist dl,
const char *  name,
const char *  linkname,
struct avstat attr 
)

Definition at line 971 of file remote.c.

{
    struct remdirent *de;

    dl->ents = av_realloc(dl->ents, sizeof(*dl->ents) * (dl->num + 1));
    de = &dl->ents[dl->num];
    dl->num++;

    de->name = av_strdup(name);
    de->linkname = av_strdup(linkname);
    de->attr = *attr;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int av_remote_init ( struct vmodule module,
struct remote rem,
struct avfs **  resp 
)

Definition at line 986 of file remote.c.

{
    int res;
    struct avfs *avfs;
    struct remfs *fs;

    res = av_new_avfs(rem->name, NULL, AV_VER, AVF_ONLYROOT | AVF_NOLOCK,
                        module, &avfs);
    if(res < 0) {
        rem->destroy(rem);
        return res;
    }

    AV_NEW(fs);
    fs->ns = av_namespace_new();
    fs->list.next = fs->list.prev = &fs->list;
    fs->rem = rem;
    fs->avfs = avfs;

    avfs->data = fs;
    avfs->destroy = rem_destroy;

    avfs->lookup    = rem_lookup;
    avfs->putent    = rem_putent;
    avfs->copyent   = rem_copyent;
    avfs->getpath   = rem_getpath;

    avfs->open      = rem_open;

    avfs->close     = rem_close;
    avfs->read      = rem_read;
    avfs->readdir   = rem_readdir;
    avfs->getattr   = rem_getattr;

    avfs->access    = rem_access;
    avfs->readlink  = rem_readlink;

    av_add_avfs(avfs);
    
    *resp = avfs;

    return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function: