Public Types | Public Member Functions | Static Public Member Functions
Tonido::Plugin::Manifest Class Reference

Represents a manifest.xml file that describes a plugin. More...

List of all members.

Public Types

typedef boost::shared_ptr
< Manifest
SharedPtr
typedef std::map< std::string,
ManifestFileData::SharedPtr > 
FileList

Public Member Functions

 Manifest ()
 Manifest (Manifest::ManifestData &a_data)
 ~Manifest ()
 Dtor.
bool loadData (const std::string &a_fileName, bool a_tightCheck=false)
 Loads the manifest data from the given XML file.
bool loadURL (const std::string &a_url, const std::string &a_fileName, bool a_saveLocal)
 Loads the manifest data from the given URL.
bool writeData (const std::string &a_fileName)
 Writes manifest data into the XML file.
bool writeData (const std::string &a_fileName, const std::string &a_privateKey, const std::string &a_signatureIndex)
void addFileData (const std::string &a_fileName, const std::string &a_checkSum, const std::string &a_filePath, bool a_isExecutable)
 Adds a local file into the manifest. This automatically calculates the checksum.
const FileList & getFileList () const
 Gets the file list in the Patch Manifest file.
const ActionList & getActionList () const
 Gets the action list in the Patch Manifest file.
bool processActions (const std::string &a_when, const std::string &a_state, const std::string &a_baseDir)
 Process the Actions for a given condition.
const std::vector< std::string > & getSharedLibraryList () const
 Gets the shared library list in the Patch Manifest file.
void clearFileData ()
 Clears all file data in this manifest.
bool isValidForUpdate ()
 Returns true if the manifest is valid.
bool checkManifestRequirements (bool a_checkVersions)
 Returns true if the manifest meta data requirements our running environment.
const ManifestData & getMetaData ()
 Returns the meta data associated with this manifest.
void setManifestVersion (const std::string &a_version)
 Sets the Manifest Version.
bool isValid ()
 Returns true if the manifest is valid.
const SignatureData & getSignatureData ()
 Returns the signature data associated with this manifest.

Static Public Member Functions

static void loadMetaData (TiXmlElement *meta, ManifestData &a_data)
 Loads the XML Meta Data.

Detailed Description

Represents a manifest.xml file that describes a plugin.

This stores information about a set of files. This can represent the core system as well as any of the plugins.


Constructor & Destructor Documentation

Tonido::Plugin::Manifest::Manifest ( )

Ctor

Details if needed

Tonido::Plugin::Manifest::~Manifest ( )

Dtor.

Details if needed


Member Function Documentation

void Tonido::Plugin::Manifest::addFileData ( const std::string &  a_fileName,
const std::string &  a_checkSum,
const std::string &  a_filePath,
bool  a_isExecutable 
)

Adds a local file into the manifest. This automatically calculates the checksum.

Parameters:
[in]a_fileNameName of the file to add
[in]a_checkSumchecksum of the file
Returns:
none
bool Tonido::Plugin::Manifest::checkManifestRequirements ( bool  a_checkVersions)

Returns true if the manifest meta data requirements our running environment.

Returns:
true if meets requirements, false otherwise
void Tonido::Plugin::Manifest::clearFileData ( )

Clears all file data in this manifest.

Returns:
none
const ActionList& Tonido::Plugin::Manifest::getActionList ( ) const

Gets the action list in the Patch Manifest file.

Returns:
ActionList from the manifest
const FileList& Tonido::Plugin::Manifest::getFileList ( ) const

Gets the file list in the Patch Manifest file.

Returns:
FileList from the manifest
const ManifestData& Tonido::Plugin::Manifest::getMetaData ( )

Returns the meta data associated with this manifest.

Returns:
meta data associated with this manifest
const std::vector<std::string>& Tonido::Plugin::Manifest::getSharedLibraryList ( ) const

Gets the shared library list in the Patch Manifest file.

Returns:
Shared Library list from the manifest
const Manifest::SignatureData & Tonido::Plugin::Manifest::getSignatureData ( )

Returns the signature data associated with this manifest.

Returns:
manifest data
bool Tonido::Plugin::Manifest::isValid ( )

Returns true if the manifest is valid.

Returns:
true if valid, false otherwise
bool Tonido::Plugin::Manifest::isValidForUpdate ( )

Returns true if the manifest is valid.

Returns:
true if valid, false otherwise
bool Tonido::Plugin::Manifest::loadData ( const std::string &  a_fileName,
bool  a_tightCheck = false 
)

Loads the manifest data from the given XML file.

Parameters:
[in]a_fileNameName of the file to load data from
Returns:
true on sucess, false otherwise
bool Tonido::Plugin::Manifest::loadURL ( const std::string &  a_url,
const std::string &  a_fileName,
bool  a_saveLocal 
)

Loads the manifest data from the given URL.

If necessary, it will save it to the local file.

Parameters:
[in]a_urlURL to read from
Returns:
true on sucess, false otherwise
bool Tonido::Plugin::Manifest::processActions ( const std::string &  a_when,
const std::string &  a_state,
const std::string &  a_baseDir 
)

Process the Actions for a given condition.

Returns:
ActionList from the manifest
bool Tonido::Plugin::Manifest::writeData ( const std::string &  a_fileName)

Writes manifest data into the XML file.

Parameters:
[in]a_fileNameName of the file to load data from
Returns:
true on sucess, false otherwise

Generated on Wed Oct 12 2011 21:46:53. © CodeLathe LLC 2007-2011. All Rights Reserved.