Helper class that allows you to read case metadata from a VTFx file. More...
Public Member Functions | |
VTFxFileBrowser () | |
Constructs an empty object. More... | |
bool | initialize (const Str &fileName) |
Opens a VTFx file in read only mode. More... | |
bool | initialize (const VTFxMemoryFile *vtfxMemFile) |
Opens a VTFx file in read only mode. More... | |
void | setPassword (const Str &password) |
Sets the password used to decrypted encrypted files. More... | |
size_t | caseCount () const |
Returns number of cases in the file. More... | |
Str | caseName (size_t caseIndex) const |
Returns the case name for the case with the given index. More... | |
Str | caseDescriptionHtml (size_t caseIndex) const |
Returns the case description for the case with the given index. More... | |
Image * | caseSnapshot (size_t caseIndex) const |
Returns the case snapshot for the case with the given index. Returns NULL if no snapshot image. More... | |
int | caseId (size_t caseIndex) const |
Returns the case name for the case with the given index. More... | |
size_t | caseIndex (int caseId) const |
Returns the case name for the case with the given index. More... | |
Str | readTextFile (const Str &filename) const |
Returns the content of a text file within the VTFx archive as a string. More... | |
size_t | userTextFileCount () const |
Returns the number of user created text files in the VTFx file. More... | |
Str | userTextFileName (size_t userTextFileIndex) const |
Returns the name of the user text file with index textFileIndex. More... | |
Str | userTextFileContent (size_t userTextFileIndex) const |
Returns the content of the user text file with index textFileIndex. More... | |
int | vendorId () const |
Returns the vendor id of the current VTFx model. More... | |
bool | hasValidExpressSignature (const Str &vendorCode) const |
Returns true if the current VTFx file has a valid express signature. More... | |
bool | isPasswordValid () const |
Returns true if the password that has been set for the browser allows to open the file. More... | |
bool | isLegacyFile () const |
Returns true if the file is a legacy (Gen2) file with old-style properties. More... | |
bool | fileInfo (PropertySet *properties) |
Gets the file information for this file. More... | |
Static Public Member Functions | |
static bool | isVTFxFile (const Str &fileName) |
Returns true if file fileName is a valid VTFx file. More... | |
static bool | isEncrypted (const Str &fileName) |
Returns true if file fileName is encrypted and requires a password to be opened. More... | |
Helper class that allows you to read case metadata from a VTFx file.
Use the VTFx file browser to get information about an existing VTFx file.
Available metadata:
The VTFxFileBrowser can also check if an existing VTFx file is valid (isVTFxFile()).
cee::ug::VTFxFileBrowser::VTFxFileBrowser | ( | ) |
Constructs an empty object.
size_t cee::ug::VTFxFileBrowser::caseCount | ( | ) | const |
Returns number of cases in the file.
Str cee::ug::VTFxFileBrowser::caseDescriptionHtml | ( | size_t | caseIndex | ) | const |
Returns the case description for the case with the given index.
int cee::ug::VTFxFileBrowser::caseId | ( | size_t | caseIndex | ) | const |
Returns the case name for the case with the given index.
size_t cee::ug::VTFxFileBrowser::caseIndex | ( | int | caseId | ) | const |
Returns the case name for the case with the given index.
Str cee::ug::VTFxFileBrowser::caseName | ( | size_t | caseIndex | ) | const |
Returns the case name for the case with the given index.
Image * cee::ug::VTFxFileBrowser::caseSnapshot | ( | size_t | caseIndex | ) | const |
Returns the case snapshot for the case with the given index. Returns NULL if no snapshot image.
bool cee::ug::VTFxFileBrowser::fileInfo | ( | cee::PropertySet * | properties | ) |
Gets the file information for this file.
Gets file information such as export date, vendor name, vendor application and database name to the given property set. Returns true if any properties were found.
bool cee::ug::VTFxFileBrowser::hasValidExpressSignature | ( | const Str & | vendorCode | ) | const |
Returns true if the current VTFx file has a valid express signature.
bool cee::ug::VTFxFileBrowser::initialize | ( | const Str & | fileName | ) |
Opens a VTFx file in read only mode.
File must be opened before any case info can be retrieved.
Returns true if file was opened successfully.
bool cee::ug::VTFxFileBrowser::initialize | ( | const VTFxMemoryFile * | vtfxMemFile | ) |
Opens a VTFx file in read only mode.
File must be opened before any case info can be retrieved.
Returns true if file was opened successfully.
|
static |
Returns true if file fileName is encrypted and requires a password to be opened.
bool cee::ug::VTFxFileBrowser::isLegacyFile | ( | ) | const |
Returns true if the file is a legacy (Gen2) file with old-style properties.
bool cee::ug::VTFxFileBrowser::isPasswordValid | ( | ) | const |
Returns true if the password that has been set for the browser allows to open the file.
|
static |
Returns true if file fileName is a valid VTFx file.
Returns the content of a text file within the VTFx archive as a string.
The filename is the full path within the VTFx archive, including file ending. For instance, UserData/myConfig.xml.
void cee::ug::VTFxFileBrowser::setPassword | ( | const Str & | password | ) |
Sets the password used to decrypted encrypted files.
If file is encrypted, the password must be set before calling initialize()
cee::Str cee::ug::VTFxFileBrowser::userTextFileContent | ( | size_t | userTextFileIndex | ) | const |
Returns the content of the user text file with index textFileIndex.
size_t cee::ug::VTFxFileBrowser::userTextFileCount | ( | ) | const |
Returns the number of user created text files in the VTFx file.
cee::Str cee::ug::VTFxFileBrowser::userTextFileName | ( | size_t | userTextFileIndex | ) | const |
Returns the name of the user text file with index textFileIndex.
int cee::ug::VTFxFileBrowser::vendorId | ( | ) | const |
Returns the vendor id of the current VTFx model.