Add Mooffie as author of new high-level mouse API.
[midnight-commander.git] / src / filemanager / file.h
blob0406b87685f821ed0c9441828bee40300f0308fd
1 /** \file file.h
2 * \brief Header: File and directory operation routines
3 */
5 #ifndef MC__FILE_H
6 #define MC__FILE_H
8 #include <inttypes.h> /* off_t, uintmax_t */
10 #include "lib/global.h"
11 #include "lib/widget.h"
13 #include "fileopctx.h"
15 /*** typedefs(not structures) and defined constants **********************************************/
17 typedef struct dirsize_status_msg_t dirsize_status_msg_t;
19 /*** enums ***************************************************************************************/
21 /*** structures declarations (and typedefs of structures)*****************************************/
23 /* status dialog of directory size computing */
24 struct dirsize_status_msg_t
26 status_msg_t status_msg; /* base class */
28 gboolean allow_skip;
29 WLabel *dirname;
30 WLabel *count_size;
31 Widget *abort_button;
32 Widget *skip_button;
33 const vfs_path_t *dirname_vpath;
34 size_t dir_count;
35 uintmax_t total_size;
38 /*** global variables defined in .c file *********************************************************/
40 /*** declarations of public functions ************************************************************/
42 FileProgressStatus copy_file_file (file_op_total_context_t * tctx, file_op_context_t * ctx,
43 const char *src_path, const char *dst_path);
44 FileProgressStatus move_dir_dir (file_op_total_context_t * tctx, file_op_context_t * ctx,
45 const char *s, const char *d);
46 FileProgressStatus copy_dir_dir (file_op_total_context_t * tctx, file_op_context_t * ctx,
47 const char *s, const char *d,
48 gboolean toplevel, gboolean move_over, gboolean do_delete,
49 GSList * parent_dirs);
50 FileProgressStatus erase_dir (file_op_total_context_t * tctx, file_op_context_t * ctx,
51 const vfs_path_t * vpath);
53 gboolean panel_operate (void *source_panel, FileOperation op, gboolean force_single);
55 /* Error reporting routines */
57 /* Report error with one file */
58 FileProgressStatus file_error (const char *format, const char *file);
60 /* return value is FILE_CONT or FILE_ABORT */
61 FileProgressStatus compute_dir_size (const vfs_path_t * dirname_vpath, dirsize_status_msg_t * sm,
62 size_t * ret_dir_count, size_t * ret_marked_count,
63 uintmax_t * ret_total, gboolean compute_symlinks);
65 void dirsize_status_init_cb (status_msg_t * sm);
66 int dirsize_status_update_cb (status_msg_t * sm);
67 void dirsize_status_deinit_cb (status_msg_t * sm);
69 /*** inline functions ****************************************************************************/
70 #endif /* MC__FILE_H */