# DownloadableFileDescriptor Struct Reference
[Autopatcher]

File information. More...

`#include <DownloadableFileDescriptor.h>`

List of all members.

## Public Member Functions

| DownloadableFileDescriptor ()
| ~DownloadableFileDescriptor ()
void | Clear (void)
void | SerializeHeader (RakNet::BitStream *out)
void | SerializeSHA1 (RakNet::BitStream *out)
void | SerializeFileData (RakNet::BitStream *out)
bool | DeserializeHeader (RakNet::BitStream *in)
bool | DeserializeSHA1 (RakNet::BitStream *in)
bool | DeserializeFileData (RakNet::BitStream *in)

## Public Attributes

char * | filename
unsigned | fileLength
bool | fileDataIsCompressed
unsigned | compressedFileLength
char | SHA1Code [SHA1_LENGTH]
char * | fileData

## Detailed Description

File information.

A file descriptor contains informations used by the autopatcher to detect whether or not a file need to be updated or not.

## Constructor & Destructor Documentation

DownloadableFileDescriptor::DownloadableFileDescriptor | ( |  | ) |

| Default Constructor

DownloadableFileDescriptor::~DownloadableFileDescriptor | ( |  | ) |

| Destructor

## Member Function Documentation

void DownloadableFileDescriptor::Clear | ( | void |  | ) |

| Clear the file descriptor

bool DownloadableFileDescriptor::DeserializeFileData | ( | RakNet::BitStream * | in | ) |

Retrieve File data

Parameters:

  | in | the incoming data

Returns:
  True on success false otherwise

bool DownloadableFileDescriptor::DeserializeHeader | ( | RakNet::BitStream * | in | ) |

Retrieve Header information from a BitStream

Parameters:

  | in | the incoming data

Returns:
  True on success false otherwise

bool DownloadableFileDescriptor::DeserializeSHA1 | ( | RakNet::BitStream * | in | ) |

Retrieve SHA1 hash

Parameters:

  | in | the incoming data

Returns:
  True on success false otherwise

void DownloadableFileDescriptor::SerializeFileData | ( | RakNet::BitStream * | out | ) |

Append file content to the BitStream

Parameters:

  | out | The BitStream object which will contains the result.

void DownloadableFileDescriptor::SerializeHeader | ( | RakNet::BitStream * | out | ) |

Append to a BitStream the header for this file.

Parameters:

  | out | The BitStream object which will contains the result.

void DownloadableFileDescriptor::SerializeSHA1 | ( | RakNet::BitStream * | out | ) |

Append the SHA1 hash information to the BitStream

Parameters:

  | out | The BitStream object which will contains the result.

## Member Data Documentation

unsigned DownloadableFileDescriptor::compressedFileLength

| The size of the compressed file

char* DownloadableFileDescriptor::fileData

| The data of the file.

bool DownloadableFileDescriptor::fileDataIsCompressed

| True if data is compressed using zlib

unsigned DownloadableFileDescriptor::fileLength

| The size of the file.

char* DownloadableFileDescriptor::filename

| The filename. It is a relative path.

char DownloadableFileDescriptor::SHA1Code[SHA1_LENGTH]

| The SHA-1 hash key

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

- Projects/raknet/include/autopatcher/DownloadableFileDescriptor.h
- Projects/raknet/Source/Autopatcher/DownloadableFileDescriptor.cpp