libmspack

Data Fields
mscabd_cabinet Struct Reference

A structure which represents a single cabinet file. More...

`#include <mspack.h>`

Collaboration diagram for mscabd_cabinet:
[legend]

## Data Fields
struct mscabd_cabinet * | next
| The next cabinet in a chained list, if this cabinet was opened with mscab_decompressor::search(). More...
const char * | filename
| The filename of the cabinet. More...
off_t | base_offset
| The file offset of cabinet within the physical file it resides in. More...
unsigned int | length
| The length of the cabinet file in bytes. More...
struct mscabd_cabinet * | prevcab
| The previous cabinet in a cabinet set, or NULL. More...
struct mscabd_cabinet * | nextcab
| The next cabinet in a cabinet set, or NULL. More...
char * | prevname
| The filename of the previous cabinet in a cabinet set, or NULL. More...
char * | nextname
| The filename of the next cabinet in a cabinet set, or NULL. More...
char * | previnfo
| The name of the disk containing the previous cabinet in a cabinet set, or NULL. More...
char * | nextinfo
| The name of the disk containing the next cabinet in a cabinet set, or NULL. More...
struct mscabd_file * | files
| A list of all files in the cabinet or cabinet set. More...
struct mscabd_folder * | folders
| A list of all folders in the cabinet or cabinet set. More...
unsigned short | set_id
| The set ID of the cabinet. More...
unsigned short | set_index
| The index number of the cabinet within the set. More...
unsigned short | header_resv
| The number of bytes reserved in the header area of the cabinet. More...
int | flags
| Header flags. More...

## Detailed Description

A structure which represents a single cabinet file.

All fields are READ ONLY.

If this cabinet is part of a merged cabinet set, the files and folders fields are common to all cabinets in the set, and will be identical.

See also
  mscab_decompressor::open(), mscab_decompressor::close(), mscab_decompressor::search()

## Field Documentation

## ◆ base_offset

off_t mscabd_cabinet::base_offset

The file offset of cabinet within the physical file it resides in.

## ◆ filename

const char* mscabd_cabinet::filename

The filename of the cabinet.

More correctly, the filename of the physical file that the cabinet resides in. This is given by the library user and may be in any format.

## ◆ files

struct mscabd_file* mscabd_cabinet::files

A list of all files in the cabinet or cabinet set.

## ◆ flags

int mscabd_cabinet::flags

Header flags.

- MSCAB_HDR_PREVCAB indicates the cabinet is part of a cabinet set, and has a predecessor cabinet.
- MSCAB_HDR_NEXTCAB indicates the cabinet is part of a cabinet set, and has a successor cabinet.
- MSCAB_HDR_RESV indicates the cabinet has reserved header space.

See also
  prevname, previnfo, nextname, nextinfo, header_resv

## ◆ folders

struct mscabd_folder* mscabd_cabinet::folders

A list of all folders in the cabinet or cabinet set.

## ◆ header_resv

unsigned short mscabd_cabinet::header_resv

The number of bytes reserved in the header area of the cabinet.

If this is non-zero and flags has MSCAB_HDR_RESV set, this data can be read by the calling application. It is of the given length, located at offset (base_offset + MSCAB_HDR_RESV_OFFSET) in the cabinet file.

See also
  flags

## ◆ length

unsigned int mscabd_cabinet::length

The length of the cabinet file in bytes.

## ◆ next

struct mscabd_cabinet* mscabd_cabinet::next

The next cabinet in a chained list, if this cabinet was opened with mscab_decompressor::search().

May be NULL to mark the end of the list.

## ◆ nextcab

struct mscabd_cabinet* mscabd_cabinet::nextcab

The next cabinet in a cabinet set, or NULL.

## ◆ nextinfo

char* mscabd_cabinet::nextinfo

The name of the disk containing the next cabinet in a cabinet set, or NULL.

## ◆ nextname

char* mscabd_cabinet::nextname

The filename of the next cabinet in a cabinet set, or NULL.

## ◆ prevcab

struct mscabd_cabinet* mscabd_cabinet::prevcab

The previous cabinet in a cabinet set, or NULL.

## ◆ previnfo

char* mscabd_cabinet::previnfo

The name of the disk containing the previous cabinet in a cabinet set, or NULL.

## ◆ prevname

char* mscabd_cabinet::prevname

The filename of the previous cabinet in a cabinet set, or NULL.

## ◆ set_id

unsigned short mscabd_cabinet::set_id

The set ID of the cabinet.

All cabinets in the same set should have the same set ID.

## ◆ set_index

unsigned short mscabd_cabinet::set_index

The index number of the cabinet within the set.

Numbering should start from 0 for the first cabinet in the set, and increment by 1 for each following cabinet.

The documentation for this struct was generated from the following file:

- mspack.h