#include <ZipExtraField.h>
|
| static bool | HasSize (WORD headerID) |
Represents a local or central extra field in a zip archive. This is a collection of extra data records (CZipExtraData).
- See also
- Providing Custom Data: Extra Fields
-
CZipExtraData
◆ CZipExtraField()
Copy constructor.
- Parameters
-
| arr | The extra field to copy from. |
◆ Add()
Adds a new extra data record to the extra field.
- Parameters
-
| pExtra | The extra data record to add. |
- Returns
- The index of pExtra in the internal collection.
◆ Clear()
| void CZipExtraField::Clear |
( |
| ) |
|
|
inlineprotected |
Removes all extra data records from the extra field.
◆ CreateNew() [1/2]
| CZipExtraData * CZipExtraField::CreateNew |
( |
WORD | headerID, |
|
|
bool | bAppend = true ) |
|
inline |
Creates a new extra data record with the given ID and adds it to the extra field.
- Parameters
-
| headerID | The extra data ID. |
| bAppend | If true, add the header at the end of the collection; otherwise add the header at the beginning of the collection |
- Returns
- The created extra data record.
- See also
- CZipExtraData::GetHeaderID
◆ CreateNew() [2/2]
| CZipExtraData * CZipExtraField::CreateNew |
( |
WORD | headerID, |
|
|
int & | idx, |
|
|
bool | bAppend = true ) |
|
inline |
Creates a new extra data record with the given ID and adds it to the extra field.
- Parameters
-
| headerID | The extra data ID. |
| idx | Receives the value of the index of the new extra data in the internal collection. |
| bAppend | If true, add the header at the end of the collection; otherwise add the header at the beginning of the collection |
- Returns
- The created extra data record.
- See also
- CZipExtraData::GetHeaderID
◆ GetAt()
Returns the extra data record at the given index.
- Parameters
-
| index | The index of extra data record to retrieve. |
- Returns
- The extra data record.
◆ GetCount()
| int CZipExtraField::GetCount |
( |
| ) |
const |
|
inline |
Returns the number of extra data records included in the extra field.
- Returns
- The number of extra fields included.
◆ GetTotalSize()
| int CZipExtraField::GetTotalSize |
( |
| ) |
const |
Returns the total size the extra data will occupy in the archive.
- Returns
- The size in bytes.
◆ HasHeader()
| 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.
- Parameters
-
| headerID | The ID of the extra data to check. |
- Returns
true, if the extra data record with the given ID is present in the extra field; false otherwise.
◆ HasSize()
| bool CZipExtraField::HasSize |
( |
WORD | headerID | ) |
|
|
inlinestatic |
Returns the value indicating whether the extra data record with the given ID writes its size.
- Parameters
-
| headerID | The ID of extra data to examine. |
- Returns
true, if the extra data record writes its size; false otherwise.
- See also
- m_aNoSizeExtraHeadersID
◆ Lookup() [1/2]
Searches the extra field for the extra data record with the given ID.
- Parameters
-
| headerID | The ID of the extra data to search. |
- Returns
- The found extra data record or
NULL, if the extra data could not be found.
◆ Lookup() [2/2]
| CZipExtraData * CZipExtraField::Lookup |
( |
WORD | headerID, |
|
|
int & | index ) const |
Searches the extra field for the extra data record with the given ID.
- Parameters
-
| 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. |
- Returns
- The found extra data record or
NULL, if the extra data could not be found.
◆ operator=()
Assignment operator.
- Parameters
-
| field | The extra field to copy from. |
- Returns
- Reference to this object.
◆ Read()
| bool CZipExtraField::Read |
( |
CZipStorage * | pStorage, |
|
|
WORD | uSize ) |
|
protected |
Reads the extra field from buffer.
- Parameters
-
| pStorage | The storage to read the data from. |
| uSize | The size of the data to read. |
- Returns
false, if uSize was smaller than the declared extra field size; true otherwise.
◆ Remove()
| void CZipExtraField::Remove |
( |
WORD | headerID | ) |
|
Removes the extra data with the given ID.
- Parameters
-
| headerID | The ID of the extra data to remove. |
◆ RemoveAt()
| void CZipExtraField::RemoveAt |
( |
int | index | ) |
|
|
inline |
Removes the extra data record at the given index.
- Parameters
-
| index | The index of the extra data record to remove. |
◆ RemoveInternalHeaders()
| void CZipExtraField::RemoveInternalHeaders |
( |
| ) |
|
Removes all extra data records from the central extra field that are internally used by the ZipArchive Library.
◆ RemoveInternalLocalHeaders()
| void CZipExtraField::RemoveInternalLocalHeaders |
( |
| ) |
|
Removes all extra data records from the local extra field that are internally used by the ZipArchive Library.
◆ Validate()
| bool CZipExtraField::Validate |
( |
| ) |
const |
|
inline |
Validates the current size of the extra field.
- Returns
false, if the size is larger than allowed; false otherwise.
◆ Write()
| void CZipExtraField::Write |
( |
char * | buffer | ) |
const |
|
protected |
Writes the extra field to buffer.
- Parameters
-
| buffer | The buffer to write to. |
◆ m_aNoSizeExtraHeadersID
| CZipArray<WORD> CZipExtraField::m_aNoSizeExtraHeadersID |
|
static |
The documentation for this class was generated from the following file: