LibreOffice Module onlineupdate (master) 1
|
#include <archivereader.h>
Public Member Functions | |
ArchiveReader () | |
~ArchiveReader () | |
int | Open (const NS_tchar *path) |
int | VerifySignature () |
Performs a verification on the opened MAR file. More... | |
int | VerifyProductInformation (const char *MARChannelID, const char *appVersion) |
Verifies that the MAR file matches the current product, channel, and version. More... | |
void | Close () |
int | ExtractFile (const char *item, const NS_tchar *destination) |
int | ExtractFileToStream (const char *item, FILE *fp) |
Private Member Functions | |
int | ExtractItemToStream (const MarItem *item, FILE *fp) |
Private Attributes | |
MarFile * | mArchive |
Definition at line 15 of file archivereader.h.
|
inline |
Definition at line 18 of file archivereader.h.
|
inline |
Definition at line 19 of file archivereader.h.
References Close().
void ArchiveReader::Close | ( | ) |
Definition at line 233 of file archivereader.cxx.
References inbuf, mar_close(), mArchive, and outbuf.
Referenced by Open(), and ~ArchiveReader().
Definition at line 255 of file archivereader.cxx.
References ExtractItemToStream(), FILE, MarItem_::flags, mar_find_item(), mArchive, name, READ_ERROR, and WRITE_ERROR.
Referenced by DoUpdate(), and AddFile::Execute().
Definition at line 280 of file archivereader.cxx.
References ExtractItemToStream(), mar_find_item(), mArchive, name, and READ_ERROR.
Referenced by PatchFile::Prepare().
Definition at line 290 of file archivereader.cxx.
References inbuf, inbuf_size, MarItem_::length, mar_read(), mArchive, OK, outbuf, outbuf_size, READ_ERROR, UNEXPECTED_BZIP_ERROR, UNEXPECTED_MAR_ERROR, and WRITE_ERROR_EXTRACT.
Referenced by ExtractFile(), and ExtractFileToStream().
Definition at line 190 of file archivereader.cxx.
References ARCHIVE_READER_MEM_ERROR, Close(), inbuf, inbuf_size, mar_open(), mArchive, OK, outbuf, outbuf_size, and READ_ERROR.
Referenced by UpdateThreadFunc().
int ArchiveReader::VerifyProductInformation | ( | const char * | MARChannelID, |
const char * | appVersion | ||
) |
Verifies that the MAR file matches the current product, channel, and version.
MARChannelID | The MAR channel name to use, only updates from MARs with a matching MAR channel name will succeed. If an empty string is passed, no check will be done for the channel name in the product information block. If a comma separated list of values is passed then one value must match. |
appVersion | The application version to use, only MARs with an application version >= to appVersion will be applied. |
Definition at line 126 of file archivereader.cxx.
References ARCHIVE_NOT_OPEN, mozilla::CompareVersions(), COULD_NOT_READ_PRODUCT_INFO_BLOCK_ERROR, MAR_CHANNEL_MISMATCH_ERROR, mar_read_product_info_block(), ProductInformationBlock::MARChannelID, mArchive, OK, ProductInformationBlock::productVersion, and VERSION_DOWNGRADE_ERROR.
Referenced by CheckSignature().
int ArchiveReader::VerifySignature | ( | ) |
Performs a verification on the opened MAR file.
Both the primary and backup keys stored are stored in the current process and at least the primary key will be tried. Success will be returned as long as one of the two signatures verify.
Definition at line 81 of file archivereader.cxx.
References ARCHIVE_NOT_OPEN, mArchive, OK, and VerifyLoadedCert().
Referenced by CheckSignature().
|
private |
Definition at line 36 of file archivereader.h.
Referenced by Close(), ExtractFile(), ExtractFileToStream(), ExtractItemToStream(), Open(), VerifyProductInformation(), and VerifySignature().