fsd_mysql.h File Reference

Header file for implementation of mysql commands to db, file fsd_mysql.c. More...

#include <mysql/mysql.h>
#include "fsd_defines.h"

Go to the source code of this file.

Functions

declaration of functions for connect and close database
MYSQL * fsd_db_connect (char *server, char *user, char *password, char *database)
 Connect to database.
void fsd_db_close (MYSQL *conn)
 Close connection to database.
declaration of functions for filesystem to use database
int fsd_test (MYSQL *conn)
 Test database connection.
int fsd_create (MYSQL *conn, char *dir, char *filename, char *return_text)
 Create new empty file.
int fsd_mkdir (MYSQL *conn, char *dir, char *dirname, char *return_text)
 Create new directory.
int fsd_clear_file (MYSQL *conn, char *file, char *return_text)
 Clear file.
int fsd_add_block (MYSQL *conn, char *file, int block_size, char *block, char *return_text)
 Add block to file.
int fsd_replace_block (MYSQL *conn, char *file, char *offset, int block_size, char *block, char *return_text)
 Replace block of file.
int fsd_remove_file (MYSQL *conn, char *file, char *return_text)
 Remove file.
int fsd_remove_dir (MYSQL *conn, char *dir, char *return_text)
 Remove dir.
int fsd_get_block (MYSQL *conn, char *file, char *offset, int *block_size, char *block, char *return_text)
 Get block of file.
int fsd_lookup (MYSQL *conn, char *dir, char *name, char *return_text)
 Lookup for file or directory defined by name.
int fsd_read_inode (MYSQL *conn, char *inode_nr, char *return_text)
 Used for super read inode. Returns information about inode.
int fsd_read_dir (MYSQL *conn, char *dir, rd_item **rd_list, char *return_text)
 Read files and directories in directory.
int fsd_file_info (MYSQL *conn, char *file, char *return_text)
 Return file info - file size.
int fsd_dir_info (MYSQL *conn, char *dir, char *return_text)
 Return dir info - count of items.
int fsd_move_file (MYSQL *conn, char *file, char *dir, char *return_text)
 Move file.
int fsd_rename_file (MYSQL *conn, char *file, char *name, char *return_text)
 Rename file.
int fsd_rename_dir (MYSQL *conn, char *dir, char *name, char *return_text)
 Rename directory.
int fsd_truncate_file (MYSQL *conn, char *file, char *new_file_size, char *return_text)
 Truncate file.

Variables

declaration of variables which supports connection to database
char * server = "localhost"
char * user = "mysqlfs"
char * password = "mysqlfs"
char * database = "mysqlfs"


Detailed Description

Header file for implementation of mysql commands to db, file fsd_mysql.c.

Author:
Michal Podzimek, Michal Ficek, Tomas Pop, MFF UK, 2007

Definition in file fsd_mysql.h.


Generated on Mon May 28 13:33:08 2007 for MYSQLFS by  doxygen 1.5.0