CCInfo Acrobat plugin object. More...
#include <CCInfoFullPlugin.h>
Inherits CCInfoPlugin.

Public Member Functions | |
| CCInfoFullPlugin () | |
| Constructor. | |
| virtual const char * | GetExtensionName () |
| Unique name of plugin (for inter-plugin communications and such). | |
| virtual ASBool | PluginInit () |
| Called when the plugin is initialized; registers the command. | |
| bool | CanChangeDoc () |
| Checks if the current document can be changed. | |
| virtual void | ShowLicense () |
| Displays the license dialog. | |
| virtual std::string | GetPluginName () const |
| Retrieve the plugin name. | |
| virtual std::string | GetPluginUIName () const |
| Retrieve the plugin name. | |
| virtual void | ShowAbout () |
| Retrieve the plugin name. | |
| void | RetrieveCCInfo (LicenseInfo::LoadedLicenseDataType eType) |
| Retrieves the license request information for a license type (connects to the internet if necessary). | |
| bool | RetrieveCCInfo (const LicenseInfo &info, XDoc &doc) |
| Retrieves the license for a license type (with user data) (connects to the internet if necessary). | |
| bool | UpdateLicense (const std::string &sAlt, const std::string &sMarked, const std::string &sWebStatement) |
| Updates the current document's license. | |
Protected Member Functions | |
| void | LoadInternalLicenseInfo (LicenseInfo::LoadedLicenseDataType eType) |
| Loads cached license information from the resources. | |
Protected Attributes | |
| bool | m_bRetrievedLicenseInfo [LicenseInfo::LLDT_Count] |
| Array of flags to know if a specific license information was retrieved from the internet in this session. | |
| InternetRequest | m_irSession |
| Internet Request object for this session (used to cache the connection to the Creative Commons server). | |
| std::string | m_sName |
| Cached name of the plugin. | |
CCInfo Acrobat plugin object.
Definition at line 36 of file CCInfoFullPlugin.h.
| bool CCInfoFullPlugin::CanChangeDoc | ( | ) |
Checks if the current document can be changed.
Definition at line 236 of file CCInfoFullPlugin.cpp.
Referenced by FullLicenseDialog::OnBtnClicked(), and UpdateLicense().
| virtual const char* CCInfoFullPlugin::GetExtensionName | ( | ) | [inline, virtual] |
Unique name of plugin (for inter-plugin communications and such).
Implements AcrobatPluginInfo.
Definition at line 49 of file CCInfoFullPlugin.h.
| void CCInfoFullPlugin::LoadInternalLicenseInfo | ( | LicenseInfo::LoadedLicenseDataType | eType | ) | [protected] |
Loads cached license information from the resources.
| eType | Type of license to load |
Definition at line 195 of file CCInfoFullPlugin.cpp.
References gHINSTANCE, and LicenseInfo::LoadData().
Referenced by PluginInit(), and RetrieveCCInfo().
| ASBool CCInfoFullPlugin::PluginInit | ( | ) | [virtual] |
Called when the plugin is initialized; registers the command.
Reimplemented from CCInfoPlugin.
Definition at line 179 of file CCInfoFullPlugin.cpp.
References LoadInternalLicenseInfo(), and CCInfoPlugin::PluginInit().
| bool CCInfoFullPlugin::RetrieveCCInfo | ( | const LicenseInfo & | info, | |
| XDoc & | doc | |||
| ) |
Retrieves the license for a license type (with user data) (connects to the internet if necessary).
| info | Object containing data about the license to retrieve | |
| doc | XML object to fill with retrieved data |
Definition at line 315 of file CCInfoFullPlugin.cpp.
References LicenseInfo::GetCCLicenseType(), LicenseInfo::GetLicenseXML(), LicenseInfo::LoadAndValidateData(), LicenseInfo::LoadData(), AcrobatPluginInfo::LoadStringFromResource(), LicenseInfo::m_bCommercialUse, m_bRetrievedLicenseInfo, LicenseInfo::m_eLicense, LicenseInfo::m_eModification, LicenseInfo::m_eSampling, m_irSession, LicenseInfo::m_sJurisdiction, and URLEncode().
| void CCInfoFullPlugin::RetrieveCCInfo | ( | LicenseInfo::LoadedLicenseDataType | eType | ) |
Retrieves the license request information for a license type (connects to the internet if necessary).
| eType | Type of license definitions to retrieve; must be either LLDTCC or LLDTSampling |
Definition at line 262 of file CCInfoFullPlugin.cpp.
References CCINFO_URL, RequestProgressDialog::DoRequest(), RequestProgressDialog::GetCancel(), InternetRequestBuffer::GetData(), LicenseInfo::LoadData(), LoadInternalLicenseInfo(), AcrobatPluginInfo::LoadStringFromResource(), m_bRetrievedLicenseInfo, RequestProgressDialog::m_buffer, and m_irSession.
Referenced by FullLicenseDialog::OnBtnClicked(), and ADMWizLicenseTypePage::OnKillActive().
| bool CCInfoFullPlugin::UpdateLicense | ( | const std::string & | sAlt, | |
| const std::string & | sMarked, | |||
| const std::string & | sWebStatement | |||
| ) |
Updates the current document's license.
| sAlt | The license text | |
| sMarked | The license type ("True" for copyright, "False" for public domain, "" for unknown/no license) | |
| sWebStatement | The license webstatement URL (currently, used also as the license URL) |
Definition at line 462 of file CCInfoFullPlugin.cpp.
References CanChangeDoc(), CCInfoPlugin::HasDocument(), CCInfoPlugin::m_docInfo, AcrobatPluginInfo::MakeASText(), XML_CCLICENSE, XML_DC_RIGHTS, XML_RDF_ALT, XML_RDF_DESCRIPTION, XML_RDF_LI, XML_RDF_RESROUCE, XML_X_DEFAULT, XML_XAPRIGHTS_MARKED, XML_XAPRIGHTS_STATEMENT, and XML_XML_LANG.
Referenced by FullLicenseDialog::OnBtnClicked().
1.6.1