Ring Daemon 16.0.0
Loading...
Searching...
No Matches
pluginsutils.h File Reference
Include dependency graph for pluginsutils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  jami
 
namespace  jami::PluginUtils
 
namespace  PluginUtils
 This namespace provides auxiliary functions to the Plugin System.
 

Functions

std::map< std::string, std::string > jami::PluginUtils::checkManifestJsonContentValidity (const Json::Value &root)
 Check if manifest.json has minimum format and parses its content to a map<string, string>.
 
std::map< std::string, std::string > jami::PluginUtils::checkManifestValidity (const std::vector< uint8_t > &vec)
 Recives manifest.json file contents, and checks its validity.
 
std::map< std::string, std::string > jami::PluginUtils::checkManifestValidity (std::istream &stream)
 Reads manifest.json stream and checks if it's valid.
 
bool jami::PluginUtils::checkPluginValidity (const std::filesystem::path &rootPath)
 Validates a plugin based on its manifest.json file.
 
std::filesystem::path jami::PluginUtils::dataPath (const std::filesystem::path &pluginSoPath)
 Returns data path given a plugin's library path.
 
std::string jami::PluginUtils::getLanguage ()
 Returns the language of the current locale.
 
std::map< std::string, std::string > jami::PluginUtils::getLocales (const std::string &rootPath, const std::string &lang)
 Returns the available keys and translations for a given plugin.
 
std::map< std::string, std::string > jami::PluginUtils::getPlatformInfo ()
 Returns a map with platform information.
 
std::filesystem::path jami::PluginUtils::getRootPathFromSoPath (const std::filesystem::path &soPath)
 Returns installation path given a plugin's library path.
 
std::filesystem::path jami::PluginUtils::manifestPath (const std::filesystem::path &rootPath)
 Returns complete manifest.json file path given a installation path.
 
std::map< std::string, std::string > jami::PluginUtils::parseManifestFile (const std::filesystem::path &manifestFilePath, const std::string &rootPath)
 Parses the manifest file of an installed plugin if it's valid.
 
std::string jami::PluginUtils::parseManifestTranslation (const std::string &rootPath, std::ifstream &manifestFile)
 Parses the manifest file of an installed plugin if it's valid.
 
std::map< std::string, std::string > jami::PluginUtils::processLocaleFile (const std::string &localeFilePath)
 Returns the available keys and translations for a given file.
 
std::unique_ptr< dht::crypto::Certificate > jami::PluginUtils::readPluginCertificate (const std::string &rootPath, const std::string &pluginId)
 Read the plugin's certificate.
 
std::unique_ptr< dht::crypto::Certificate > jami::PluginUtils::readPluginCertificateFromArchive (const std::string &jplPath)
 Read plugin certificate without uncompressing the whole archive.and return an object Certificate.
 
std::map< std::string, std::string > jami::PluginUtils::readPluginManifestFromArchive (const std::string &jplPath)
 Reads the manifest file content without uncompressing the whole archive and return a map with manifest contents if success.
 
std::map< std::string, std::vector< uint8_t > > jami::PluginUtils::readPluginSignatureFromArchive (const std::string &jplPath)
 Reads signature file content without uncompressing the whole archive and.
 
std::vector< uint8_tjami::PluginUtils::readSignatureFileFromArchive (const std::string &jplPath)
 Read the signature of the file signature without uncompressing the whole archive.
 
std::pair< bool, std::string_view > jami::PluginUtils::uncompressJplFunction (std::string_view relativeFileName)
 Function used by archiver to extract files from plugin jpl to the plugin installation path.