mirror of
https://github.com/reactos/reactos.git
synced 2025-04-05 05:01:03 +00:00
[CABMAN] Move CCFDATAStorage to a separate header
This commit is contained in:
parent
7394d12f7e
commit
63f3275d15
5 changed files with 41 additions and 28 deletions
|
@ -1,10 +1,10 @@
|
|||
/*
|
||||
* PROJECT: ReactOS cabinet manager
|
||||
* LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
|
||||
* PURPOSE: CCFDATAStorage class implementation for Linux/Unix
|
||||
* PURPOSE: CCFDATAStorage class implementation
|
||||
* COPYRIGHT: Copyright 2017 Casper S. Hornstrup (chorns@users.sourceforge.net)
|
||||
* Copyright 2017 Colin Finck <mail@colinfinck.de>
|
||||
* Copyright 2018 Dmitry Bagdanov <dimbo_job@mail.ru>
|
||||
* Copyright 2018 Dmitry Bagdanov <dimbo_job@mail.ru>
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -16,7 +16,7 @@
|
|||
#include <dirent.h>
|
||||
#endif
|
||||
|
||||
#include "cabinet.h"
|
||||
#include "CCFDATAStorage.h"
|
||||
#include "raw.h"
|
||||
#include "mszip.h"
|
||||
|
||||
|
|
34
sdk/tools/cabman/CCFDATAStorage.h
Normal file
34
sdk/tools/cabman/CCFDATAStorage.h
Normal file
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS cabinet manager
|
||||
* FILE: tools/cabman/cabman.h
|
||||
* PURPOSE: Cabinet manager header
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "cabinet.h"
|
||||
|
||||
#ifndef CAB_READ_ONLY
|
||||
|
||||
class CCFDATAStorage
|
||||
{
|
||||
public:
|
||||
/* Default constructor */
|
||||
CCFDATAStorage();
|
||||
/* Default destructor */
|
||||
virtual ~CCFDATAStorage();
|
||||
ULONG Create();
|
||||
ULONG Destroy();
|
||||
ULONG Truncate();
|
||||
ULONG Position();
|
||||
ULONG Seek(LONG Position);
|
||||
ULONG ReadBlock(PCFDATA Data, void* Buffer, PULONG BytesRead);
|
||||
ULONG WriteBlock(PCFDATA Data, void* Buffer, PULONG BytesWritten);
|
||||
private:
|
||||
char FullName[PATH_MAX];
|
||||
FILE* FileHandle;
|
||||
};
|
||||
|
||||
#endif /* CAB_READ_ONLY */
|
||||
|
|
@ -12,7 +12,8 @@ list(APPEND SOURCE
|
|||
mszip.h
|
||||
raw.cxx
|
||||
raw.h
|
||||
CCFDATAStorage.cxx)
|
||||
CCFDATAStorage.cxx
|
||||
CCFDATAStorage.h)
|
||||
|
||||
add_host_tool(cabman ${SOURCE})
|
||||
target_link_libraries(cabman PRIVATE host_includes zlibhost)
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
# include <sys/types.h>
|
||||
#endif
|
||||
#include "cabinet.h"
|
||||
#include "CCFDATAStorage.h"
|
||||
#include "raw.h"
|
||||
#include "mszip.h"
|
||||
|
||||
|
|
|
@ -308,29 +308,6 @@ public:
|
|||
|
||||
/* Classes */
|
||||
|
||||
#ifndef CAB_READ_ONLY
|
||||
|
||||
class CCFDATAStorage
|
||||
{
|
||||
public:
|
||||
/* Default constructor */
|
||||
CCFDATAStorage();
|
||||
/* Default destructor */
|
||||
virtual ~CCFDATAStorage();
|
||||
ULONG Create();
|
||||
ULONG Destroy();
|
||||
ULONG Truncate();
|
||||
ULONG Position();
|
||||
ULONG Seek(LONG Position);
|
||||
ULONG ReadBlock(PCFDATA Data, void* Buffer, PULONG BytesRead);
|
||||
ULONG WriteBlock(PCFDATA Data, void* Buffer, PULONG BytesWritten);
|
||||
private:
|
||||
char FullName[PATH_MAX];
|
||||
FILE* FileHandle;
|
||||
};
|
||||
|
||||
#endif /* CAB_READ_ONLY */
|
||||
|
||||
class CCabinet
|
||||
{
|
||||
public:
|
||||
|
@ -508,7 +485,7 @@ private:
|
|||
bool CreateNewDisk;
|
||||
bool CreateNewFolder;
|
||||
|
||||
CCFDATAStorage *ScratchFile;
|
||||
class CCFDATAStorage *ScratchFile;
|
||||
FILE* SourceFile;
|
||||
bool ContinueFile;
|
||||
ULONG TotalBytesLeft;
|
||||
|
|
Loading…
Reference in a new issue