112 lines
3.5 KiB
C++
Executable File
112 lines
3.5 KiB
C++
Executable File
/*
|
|
* FIELATTR.H
|
|
*
|
|
* Header file for ArchiveLib 1.0
|
|
*
|
|
* Copyright (c) 1994 Greenleaf Software, Inc.
|
|
* All Rights Reserved
|
|
*
|
|
* DESCRIPTION
|
|
*
|
|
* This file contains the class definition for ALFileAttributes.
|
|
*
|
|
* CLASS DEFINITIONS:
|
|
*
|
|
* ALFileAttributes
|
|
*
|
|
* REVISION HISTORY
|
|
*
|
|
* May 26, 1994 1.0A : First release
|
|
*
|
|
*/
|
|
|
|
#ifndef _FILEATTR_H
|
|
#define _FILEATTR_H
|
|
|
|
/*
|
|
* class ALFileAttributes
|
|
*
|
|
* DESCRIPTION
|
|
*
|
|
* This class is used to carry around file attributes. Its only
|
|
* real job at this time is to sit in the ALStorage class
|
|
* and then produce packed attributes for inclusion in an archive,
|
|
* and vice versa. We will need to add some additional members
|
|
* here for searching archives based on certain attribute criteria.
|
|
*
|
|
* Note that most of the classes in Archive library deliberately
|
|
* withhold the copy constructor and assignment operator. In this case,
|
|
* however, the compiler is able to generate an adequate version of
|
|
* these functions, so they aren't disabled.
|
|
*
|
|
* DATA MEMBERS
|
|
*
|
|
* miReadOnly : The read only file attribute bit, set when the file
|
|
* is opened or when the directory is read from the archive.
|
|
*
|
|
* miSystem : The system file attribute bit.
|
|
*
|
|
* miHidden : The hidden file attribute bit.
|
|
*
|
|
* miArchive : The archive (backup) file attribute bit.
|
|
*
|
|
* MEMBER FUNCTIONS
|
|
*
|
|
* ALFileAttributes() : The constructor, doesn't have to do much.
|
|
* ~ALFileAttributes() : The destructor, doesn't have to do anything.
|
|
* operator new( size_t size ) : Memory allocation operator, only used if
|
|
* the library is inside a DLL.
|
|
* PackedAttributes() : Returns the bits packed into an integer
|
|
* in ArchiveLib proprietary format.
|
|
* SetFromWin32Attributes() : Sets the four member bits using as input
|
|
* the attributes as returned in a Win32 call.
|
|
* GetWin32Attributes() : Returns the four member bits packed into
|
|
* Win 32 format.
|
|
* SetFromDosAttributes() : Sets the four using as input the settings
|
|
* returned from a DOS function call.
|
|
* GetDosAttributes() : Returns the member bits formatted into
|
|
* the short int used by a Dos function call.
|
|
* SetFromPackedAttributes() : Sets the member bits using as input a
|
|
* short int in proprietary ArchiveLib format.
|
|
*
|
|
* REVISION HISTORY
|
|
*
|
|
* May 26, 1994 1.0A : First release
|
|
*
|
|
*/
|
|
|
|
class AL_CLASS_TYPE ALFileAttributes {
|
|
/*
|
|
* Constructors, destructors, declarations, and friends
|
|
*/
|
|
public :
|
|
AL_PROTO ALFileAttributes();
|
|
AL_PROTO ~ALFileAttributes();
|
|
#if defined( AL_USING_DLL ) || defined( AL_BUILDING_DLL )
|
|
void AL_DLL_FAR * AL_PROTO operator new( size_t size );
|
|
#endif
|
|
/*
|
|
* Member functions
|
|
*/
|
|
public :
|
|
short unsigned int AL_PROTO PackedAttributes();
|
|
#if defined( AL_WIN32S )
|
|
void AL_PROTO SetFromWin32Attributes( DWORD win32_attributes );
|
|
DWORD AL_PROTO GetWin32Attributes();
|
|
#else
|
|
void AL_PROTO SetFromDosAttributes( unsigned dos_attributes );
|
|
unsigned short int AL_PROTO GetDosAttributes();
|
|
#endif
|
|
void AL_PROTO SetFromPackedAttributes( short int attributes );
|
|
/*
|
|
* Data members
|
|
*/
|
|
protected :
|
|
int miReadOnly:1;
|
|
int miSystem:1;
|
|
int miHidden:1;
|
|
int miArchive:1;
|
|
};
|
|
|
|
#endif /* #ifndef _FILEATTR_H */
|