2013-03-09 03:37:30 +04:00
|
|
|
/**
|
|
|
|
* xrdp: A Remote Desktop Protocol server.
|
|
|
|
*
|
2013-03-19 06:43:20 +04:00
|
|
|
* Copyright (C) Laxmikant Rashinkar 2013 LK.Rashinkar@gmail.com
|
2013-03-09 03:37:30 +04:00
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
2012-10-30 07:12:24 +04:00
|
|
|
|
2013-03-09 03:37:30 +04:00
|
|
|
#ifndef _CHANSRV_FUSE_H
|
|
|
|
#define _CHANSRV_FUSE_H
|
2012-10-30 07:12:24 +04:00
|
|
|
|
2013-03-09 03:37:30 +04:00
|
|
|
/* a file or dir entry in the xrdp file system */
|
|
|
|
struct xrdp_inode
|
|
|
|
{
|
2013-05-20 04:23:18 +04:00
|
|
|
tui32 parent_inode; /* Parent serial number. */
|
|
|
|
tui32 inode; /* File serial number. */
|
|
|
|
tui32 mode; /* File mode. */
|
|
|
|
tui32 nlink; /* symbolic link count. */
|
|
|
|
tui32 nentries; /* number of entries in a dir */
|
|
|
|
tui32 nopen; /* number of simultaneous opens */
|
|
|
|
tui32 uid; /* User ID of the file's owner. */
|
|
|
|
tui32 gid; /* Group ID of the file's group. */
|
|
|
|
size_t size; /* Size of file, in bytes. */
|
|
|
|
time_t atime; /* Time of last access. */
|
|
|
|
time_t mtime; /* Time of last modification. */
|
|
|
|
time_t ctime; /* Time of last status change. */
|
2014-07-27 23:42:12 +04:00
|
|
|
char name[1024]; /* Dir or filename */
|
2013-05-20 04:23:18 +04:00
|
|
|
tui32 device_id; /* for file system redirection */
|
|
|
|
int lindex; /* used in clipboard operations */
|
|
|
|
int is_loc_resource; /* this is not a redirected resource */
|
|
|
|
int close_in_progress; /* close cmd sent to client */
|
2013-08-10 06:43:45 +04:00
|
|
|
int stale; /* mark file as stale, ok to remove */
|
2013-03-09 03:37:30 +04:00
|
|
|
};
|
|
|
|
typedef struct xrdp_inode XRDP_INODE; // LK_TODO use this instead of using struct xrdp_inode
|
2012-10-30 07:12:24 +04:00
|
|
|
|
2016-12-23 20:52:22 +03:00
|
|
|
int xfuse_init(void);
|
|
|
|
int xfuse_deinit(void);
|
2013-03-09 03:37:30 +04:00
|
|
|
int xfuse_check_wait_objs(void);
|
|
|
|
int xfuse_get_wait_objs(tbus *objs, int *count, int *timeout);
|
2017-01-22 21:27:50 +03:00
|
|
|
int xfuse_create_share(tui32 share_id, const char *dirname);
|
2013-03-09 03:37:30 +04:00
|
|
|
|
|
|
|
int xfuse_clear_clip_dir(void);
|
2017-01-22 21:27:50 +03:00
|
|
|
int xfuse_file_contents_range(int stream_id, const char *data, int data_bytes);
|
2013-03-09 03:37:30 +04:00
|
|
|
int xfuse_file_contents_size(int stream_id, int file_size);
|
2017-01-22 21:27:50 +03:00
|
|
|
int xfuse_add_clip_dir_item(const char *filename, int flags, int size, int lindex);
|
2013-03-09 03:37:30 +04:00
|
|
|
|
2013-03-19 06:43:20 +04:00
|
|
|
/* functions that are invoked from devredir */
|
2014-07-19 22:56:00 +04:00
|
|
|
int xfuse_devredir_cb_enum_dir(void *vp, struct xrdp_inode *xinode);
|
2013-03-09 03:37:30 +04:00
|
|
|
void xfuse_devredir_cb_enum_dir_done(void *vp, tui32 IoStatus);
|
2013-06-09 05:44:21 +04:00
|
|
|
void xfuse_devredir_cb_open_file(void *vp, tui32 IoStatus, tui32 DeviceId, tui32 FileId);
|
2019-03-12 15:16:50 +03:00
|
|
|
void xfuse_devredir_cb_write_file(void *vp, const char *buf, size_t length);
|
2017-01-22 21:27:50 +03:00
|
|
|
void xfuse_devredir_cb_read_file(void *vp, const char *buf, size_t length);
|
2013-03-19 06:43:20 +04:00
|
|
|
void xfuse_devredir_cb_rmdir_or_file(void *vp, tui32 IoStatus);
|
2013-03-24 23:08:55 +04:00
|
|
|
void xfuse_devredir_cb_rename_file(void *vp, tui32 IoStatus);
|
2013-03-19 06:43:20 +04:00
|
|
|
void xfuse_devredir_cb_file_close(void *vp);
|
2012-11-05 01:52:33 +04:00
|
|
|
|
2012-10-30 07:12:24 +04:00
|
|
|
#endif
|