mirror of
https://github.com/xorgy/mediafire-fuse
synced 2026-01-14 05:24:30 -08:00
- this is useful to safe one extra call when it is known that there should be changes on the remote. In that case it will immediately skip forward to calling device/get_changes
80 lines
2.9 KiB
C
80 lines
2.9 KiB
C
/*
|
|
* Copyright (C) 2014 Johannes Schauer <j.schauer@email.de>
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
* under the terms of the GNU General Public License version 2, as published by
|
|
* the Free Software Foundation.
|
|
*
|
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
|
* more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License along with
|
|
* this program; if not, write to the Free Software Foundation, Inc., 51
|
|
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
*
|
|
*/
|
|
|
|
#ifndef _MFFUSE_HASHTBL_H_
|
|
#define _MFFUSE_HASHTBL_H_
|
|
|
|
#include <fuse/fuse.h>
|
|
#include <stdio.h>
|
|
#include <stdbool.h>
|
|
#include <stdint.h>
|
|
|
|
#include "../mfapi/mfconn.h"
|
|
|
|
typedef struct folder_tree folder_tree;
|
|
|
|
folder_tree *folder_tree_create(char *filecache);
|
|
|
|
void folder_tree_destroy(folder_tree * tree);
|
|
|
|
int folder_tree_rebuild(folder_tree * tree, mfconn * conn);
|
|
|
|
void folder_tree_housekeep(folder_tree * tree, mfconn * conn);
|
|
|
|
void folder_tree_debug(folder_tree * tree);
|
|
|
|
int folder_tree_getattr(folder_tree * tree, mfconn * conn,
|
|
const char *path, struct stat *stbuf);
|
|
|
|
int folder_tree_readdir(folder_tree * tree, mfconn * conn,
|
|
const char *path, void *buf,
|
|
fuse_fill_dir_t filldir);
|
|
|
|
void folder_tree_update(folder_tree * tree, mfconn * conn,
|
|
bool expect_changes);
|
|
|
|
int folder_tree_store(folder_tree * tree, FILE * stream);
|
|
|
|
folder_tree *folder_tree_load(FILE * stream, char *filecache);
|
|
|
|
bool folder_tree_path_exists(folder_tree * tree, mfconn * conn,
|
|
const char *path);
|
|
|
|
uint64_t folder_tree_path_get_num_children(folder_tree * tree,
|
|
mfconn * conn,
|
|
const char *path);
|
|
|
|
bool folder_tree_path_is_directory(folder_tree * tree,
|
|
mfconn * conn, const char *path);
|
|
|
|
const char *folder_tree_path_get_key(folder_tree * tree, mfconn * conn,
|
|
const char *path);
|
|
|
|
bool folder_tree_path_is_root(folder_tree * tree, mfconn * conn,
|
|
const char *path);
|
|
|
|
bool folder_tree_path_is_file(folder_tree * tree, mfconn * conn,
|
|
const char *path);
|
|
|
|
int folder_tree_open_file(folder_tree * tree, mfconn * conn,
|
|
const char *path);
|
|
|
|
int folder_tree_tmp_open(folder_tree * tree);
|
|
|
|
#endif
|