LibreOffice Module extensions (master) 1
Classes | Macros | Functions | Variables
OOoSpotlightImporter.m File Reference
#import <zlib.h>
#import "OOoSpotlightImporter.h"
#import "OOoMetaDataParser.h"
#import "OOoContentDataParser.h"
Include dependency graph for OOoSpotlightImporter.m:

Go to the source code of this file.

Classes

struct  LocalFileHeader
 
struct  CentralDirectoryEntry
 
struct  CentralDirectoryEnd
 

Macros

#define CDIR_ENTRY_SIG   (0x02014b50)
 
#define LOC_FILE_HEADER_SIG   (0x04034b50)
 
#define CDIR_END_SIG   (0x06054b50)
 

Functions

static unsigned char readByte (NSFileHandle *file)
 
static unsigned short readShort (NSFileHandle *file)
 
static unsigned readInt (NSFileHandle *file)
 
static bool readCentralDirectoryEnd (NSFileHandle *file, CentralDirectoryEnd *end)
 
static bool readCentralDirectoryEntry (NSFileHandle *file, CentralDirectoryEntry *entry)
 
static bool readLocalFileHeader (NSFileHandle *file, LocalFileHeader *header)
 
static bool areHeadersConsistent (const LocalFileHeader *header, const CentralDirectoryEntry *entry)
 
static bool findCentralDirectoryEnd (NSFileHandle *file)
 
static bool isZipFile (NSFileHandle *file)
 
static bool findDataStream (NSFileHandle *file, CentralDirectoryEntry *entry, NSString *name)
 
static NSData * getUncompressedData (NSFileHandle *file, NSString *name)
 

Variables

static NSDictionary * uti2kind
 

Macro Definition Documentation

◆ CDIR_END_SIG

#define CDIR_END_SIG   (0x06054b50)

Definition at line 79 of file OOoSpotlightImporter.m.

◆ CDIR_ENTRY_SIG

#define CDIR_ENTRY_SIG   (0x02014b50)

Definition at line 77 of file OOoSpotlightImporter.m.

◆ LOC_FILE_HEADER_SIG

#define LOC_FILE_HEADER_SIG   (0x04034b50)

Definition at line 78 of file OOoSpotlightImporter.m.

Function Documentation

◆ areHeadersConsistent()

static bool areHeadersConsistent ( const LocalFileHeader header,
const CentralDirectoryEntry entry 
)
static

◆ findCentralDirectoryEnd()

static bool findCentralDirectoryEnd ( NSFileHandle *  file)
static

Definition at line 202 of file OOoSpotlightImporter.m.

References CDIR_END_SIG, and readInt().

Referenced by findDataStream(), and isZipFile().

◆ findDataStream()

static bool findDataStream ( NSFileHandle *  file,
CentralDirectoryEntry entry,
NSString *  name 
)
static

◆ getUncompressedData()

static NSData * getUncompressedData ( NSFileHandle *  file,
NSString *  name 
)
static

◆ isZipFile()

static bool isZipFile ( NSFileHandle *  file)
static

◆ readByte()

static unsigned char readByte ( NSFileHandle *  file)
static

Definition at line 81 of file OOoSpotlightImporter.m.

References d.

Referenced by readInt(), and readShort().

◆ readCentralDirectoryEnd()

static bool readCentralDirectoryEnd ( NSFileHandle *  file,
CentralDirectoryEnd end 
)
static

Definition at line 110 of file OOoSpotlightImporter.m.

References CDIR_END_SIG, end, readInt(), and readShort().

Referenced by findDataStream(), and isZipFile().

◆ readCentralDirectoryEntry()

static bool readCentralDirectoryEntry ( NSFileHandle *  file,
CentralDirectoryEntry entry 
)
static

◆ readInt()

static unsigned readInt ( NSFileHandle *  file)
static

◆ readLocalFileHeader()

static bool readLocalFileHeader ( NSFileHandle *  file,
LocalFileHeader header 
)
static

Definition at line 159 of file OOoSpotlightImporter.m.

References header, LOC_FILE_HEADER_SIG, readInt(), and readShort().

Referenced by findDataStream(), and isZipFile().

◆ readShort()

static unsigned short readShort ( NSFileHandle *  file)
static

Variable Documentation

◆ uti2kind

NSDictionary* uti2kind
static

Definition at line 27 of file OOoSpotlightImporter.m.