#include <ZipExtraField.h>
Public Member Functions | |
int | Add (CZipExtraData *pExtra) |
CZipExtraData * | CreateNew (WORD headerID, int &idx) |
CZipExtraData * | CreateNew (WORD headerID) |
CZipExtraField (const CZipExtraField &arr) | |
CZipExtraData * | GetAt (int index) const |
int | GetCount () const |
int | GetTotalSize () const |
bool | HasHeader (WORD headerID) |
CZipExtraData * | Lookup (WORD headerID, int &index) const |
CZipExtraData * | Lookup (WORD headerID) const |
CZipExtraField & | operator= (const CZipExtraField &field) |
void | Remove (WORD headerID) |
void | RemoveAt (int index) |
void | RemoveInternalHeaders () |
void | RemoveInternalLocalHeaders () |
bool | Validate () const |
Static Public Member Functions | |
static bool | HasSize (WORD headerID) |
Static Public Attributes | |
static CZipArray< WORD > | m_aNoSizeExtraHeadersID |
Protected Member Functions | |
void | Clear () |
bool | Read (CZipStorage *pStorage, WORD uSize) |
void | Write (char *buffer) const |
Friends | |
class | CZipFileHeader |
Definition at line 58 of file ZipExtraField.h.
int CZipExtraField::Add | ( | CZipExtraData * | pExtra | ) | [inline] |
Adds a new extra data record to the extra field.
pExtra | The extra data record to add. |
Definition at line 142 of file ZipExtraField.h.
void CZipExtraField::Clear | ( | ) | [inline, protected] |
Removes all extra data records from the extra field.
Definition at line 295 of file ZipExtraField.h.
CZipExtraData* CZipExtraField::CreateNew | ( | WORD | headerID, | |
int & | idx | |||
) | [inline] |
Creates a new extra data record with the given ID and adds it to the extra field.
headerID | The extra data ID. | |
idx | Receives the value of the index of the new extra data in the internal collection. |
Definition at line 183 of file ZipExtraField.h.
CZipExtraData* CZipExtraField::CreateNew | ( | WORD | headerID | ) | [inline] |
Creates a new extra data record with the given ID and adds it to the extra field.
headerID | The extra data ID. |
Definition at line 160 of file ZipExtraField.h.
CZipExtraData* CZipExtraField::GetAt | ( | int | index | ) | const [inline] |
Returns the extra data record at the given index.
index | The index of extra data record to retrieve. |
Definition at line 116 of file ZipExtraField.h.
int CZipExtraField::GetCount | ( | ) | const [inline] |
Returns the number of extra data records included in the extra field.
Definition at line 102 of file ZipExtraField.h.
int CZipExtraField::GetTotalSize | ( | ) | const |
Returns the total size the extra data will occupy in the archive.
bool CZipExtraField::HasHeader | ( | WORD | headerID | ) | [inline] |
Returns the value indicating whether the extra data record with the given ID is present in the extra field.
headerID | The ID of the extra data to check. |
true
, if the extra data record with the given ID is present in the extra field; false
otherwise. Definition at line 235 of file ZipExtraField.h.
static bool CZipExtraField::HasSize | ( | WORD | headerID | ) | [inline, static] |
Returns the value indicating whether the extra data record with the given ID writes its size.
headerID | The ID of extra data to examine. |
true
, if the extra data record writes its size; false
otherwise.Definition at line 279 of file ZipExtraField.h.
CZipExtraData* CZipExtraField::Lookup | ( | WORD | headerID, | |
int & | index | |||
) | const |
Searches the extra field for the extra data record with the given ID.
headerID | The ID of the extra data to search. | |
index | Receives the value of the index of the found extra data in the internal collection. |
NULL
, if the extra data could not be found. CZipExtraData* CZipExtraField::Lookup | ( | WORD | headerID | ) | const [inline] |
Searches the extra field for the extra data record with the given ID.
headerID | The ID of the extra data to search. |
NULL
, if the extra data could not be found. Definition at line 220 of file ZipExtraField.h.
bool CZipExtraField::Read | ( | CZipStorage * | pStorage, | |
WORD | uSize | |||
) | [protected] |
Reads the extra field from buffer.
pStorage | The storage to read the data from. | |
uSize | The size of the data to read. |
false
, if uSize was smaller than the declared extra field size; true
otherwise. void CZipExtraField::Remove | ( | WORD | headerID | ) |
Removes the extra data with the given ID.
headerID | The ID of the extra data to remove. |
void CZipExtraField::RemoveAt | ( | int | index | ) | [inline] |
Removes the extra data record at the given index.
index | The index of the extra data record to remove. |
Definition at line 127 of file ZipExtraField.h.
void CZipExtraField::RemoveInternalHeaders | ( | ) |
Removes all extra data records from the central extra field that are internally used by the ZipArchive Library.
void CZipExtraField::RemoveInternalLocalHeaders | ( | ) |
Removes all extra data records from the local extra field that are internally used by the ZipArchive Library.
bool CZipExtraField::Validate | ( | ) | const [inline] |
Validates the current size of the extra field.
false
, if the size is larger than allowed; false
otherwise. Definition at line 91 of file ZipExtraField.h.
void CZipExtraField::Write | ( | char * | buffer | ) | const [protected] |
Writes the extra field to buffer.
buffer | The buffer to write to. |
CZipArray<WORD> CZipExtraField::m_aNoSizeExtraHeadersID [static] |
An array of headers that do not write extra data size.
Definition at line 265 of file ZipExtraField.h.