Blame channels/drive/client/drive_file.h

Packit Service fa4841
/**
Packit Service fa4841
 * FreeRDP: A Remote Desktop Protocol Implementation
Packit Service fa4841
 * File System Virtual Channel
Packit Service fa4841
 *
Packit Service fa4841
 * Copyright 2010-2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>
Packit Service fa4841
 * Copyright 2010-2011 Vic Lee
Packit Service fa4841
 * Copyright 2012 Gerald Richter
Packit Service fa4841
 * Copyright 2015 Thincast Technologies GmbH
Packit Service fa4841
 * Copyright 2015 DI (FH) Martin Haimberger <martin.haimberger@thincast.com>
Packit Service fa4841
 * Copyright 2016 Inuvika Inc.
Packit Service fa4841
 * Copyright 2016 David PHAM-VAN <d.phamvan@inuvika.com>
Packit Service fa4841
 *
Packit Service fa4841
 * Licensed under the Apache License, Version 2.0 (the "License");
Packit Service fa4841
 * you may not use this file except in compliance with the License.
Packit Service fa4841
 * You may obtain a copy of the License at
Packit Service fa4841
 *
Packit Service fa4841
 *     http://www.apache.org/licenses/LICENSE-2.0
Packit Service fa4841
 *
Packit Service fa4841
 * Unless required by applicable law or agreed to in writing, software
Packit Service fa4841
 * distributed under the License is distributed on an "AS IS" BASIS,
Packit Service fa4841
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Packit Service fa4841
 * See the License for the specific language governing permissions and
Packit Service fa4841
 * limitations under the License.
Packit Service fa4841
 */
Packit Service fa4841
Packit Service fa4841
#ifndef FREERDP_CHANNEL_DRIVE_CLIENT_FILE_H
Packit Service fa4841
#define FREERDP_CHANNEL_DRIVE_CLIENT_FILE_H
Packit Service fa4841
Packit Service fa4841
#include <winpr/stream.h>
Packit Service fa4841
#include <freerdp/channels/log.h>
Packit Service fa4841
Packit Service fa4841
#define TAG CHANNELS_TAG("drive.client")
Packit Service fa4841
Packit Service fa4841
typedef struct _DRIVE_FILE DRIVE_FILE;
Packit Service fa4841
Packit Service fa4841
struct _DRIVE_FILE
Packit Service fa4841
{
Packit Service fa4841
	UINT32 id;
Packit Service fa4841
	BOOL is_dir;
Packit Service fa4841
	HANDLE file_handle;
Packit Service fa4841
	HANDLE find_handle;
Packit Service fa4841
	WIN32_FIND_DATAW find_data;
Packit Service b1ea74
	const WCHAR* basepath;
Packit Service fa4841
	WCHAR* fullpath;
Packit Service fa4841
	WCHAR* filename;
Packit Service fa4841
	BOOL delete_pending;
Packit Service fa4841
	UINT32 FileAttributes;
Packit Service fa4841
	UINT32 SharedAccess;
Packit Service fa4841
	UINT32 DesiredAccess;
Packit Service fa4841
	UINT32 CreateDisposition;
Packit Service fa4841
	UINT32 CreateOptions;
Packit Service fa4841
};
Packit Service fa4841
Packit Service fa4841
DRIVE_FILE* drive_file_new(const WCHAR* base_path, const WCHAR* path, UINT32 PathLength, UINT32 id,
Packit Service b1ea74
                           UINT32 DesiredAccess, UINT32 CreateDisposition, UINT32 CreateOptions,
Packit Service b1ea74
                           UINT32 FileAttributes, UINT32 SharedAccess);
Packit Service fa4841
BOOL drive_file_free(DRIVE_FILE* file);
Packit Service fa4841
Packit Service fa4841
BOOL drive_file_open(DRIVE_FILE* file);
Packit Service fa4841
BOOL drive_file_seek(DRIVE_FILE* file, UINT64 Offset);
Packit Service fa4841
BOOL drive_file_read(DRIVE_FILE* file, BYTE* buffer, UINT32* Length);
Packit Service fa4841
BOOL drive_file_write(DRIVE_FILE* file, BYTE* buffer, UINT32 Length);
Packit Service fa4841
BOOL drive_file_query_information(DRIVE_FILE* file, UINT32 FsInformationClass, wStream* output);
Packit Service fa4841
BOOL drive_file_set_information(DRIVE_FILE* file, UINT32 FsInformationClass, UINT32 Length,
Packit Service fa4841
                                wStream* input);
Packit Service fa4841
BOOL drive_file_query_directory(DRIVE_FILE* file, UINT32 FsInformationClass, BYTE InitialQuery,
Packit Service fa4841
                                const WCHAR* path, UINT32 PathLength, wStream* output);
Packit Service fa4841
Packit Service fa4841
#endif /* FREERDP_CHANNEL_DRIVE_FILE_H */