if (fileLen < extLen) {
LogError("Filename " << filename << " is shorter than extension "
<< extension);
- return false;
+ false;
}
return (0 == filename.compare(fileLen - extLen, extLen, extension));
}
setApplicationType(configData);
m_needEncryption = detectResourceEncryption(configData);
setInstallLocationType(configData);
+ m_installerContext.callerPkgId =
+ DPL::FromUTF8String(getInstallerStruct().pkgmgrInterface->getCallerId());
+ LogDebug("Caller Package Id : " << m_installerContext.callerPkgId);
// Configure installation
result = ConfigureInstallation(widgetPath, configData, tempDir);
writeAttribute(writer, "type", this->type);
writeAttribute(writer, "version", this->version);
if (!this->installLocation.IsNull()) {
- writeAttribute(writer, "install-location", (*this->installLocation),
- (*this->installLocation).empty());
+ writeAttribute(writer, "install-location", (*this->installLocation));
}
+ writeAttribute(writer, "storeclient-id", this->storeClientId,
+ !this->storeClientId.empty());
FOREACH(l, this->label)
{
{
this->version = x;
}
+ void setStoreClientId(const NcnameType &x)
+ {
+ this->storeClientId= x;
+ }
private:
std::list<LabelType> label;
NmtokenType version;
std::list<Account> account;
PrivilegeType privileges;
+ NcnameType storeClientId;
};
} //namespace Jobs
DPL::String name = (!!m_context.widgetConfig.configInfo.authorName ?
*m_context.widgetConfig.configInfo.authorName : L"");
manifest.addAuthor(Author(email, href, L"", name));
+
+ if (!m_context.callerPkgId.empty()) {
+ manifest.setStoreClientId(m_context.callerPkgId);
+ }
}
void TaskManifestFile::setWidgetOtherInfo(UiApplication & uiApp)
InstallLocationType locationType;
bool isUpdateMode;
InstallMode mode;
+ DPL::String callerPkgId;
};
#endif // INSTALLER_CONTEXT_H
m_handle = NULL;
return false;
}
+ m_callerId = pkgmgr_installer_get_caller_pkgid(m_handle);
+ LogDebug("@@@@ Caller Id : " << m_callerId);
+
} else {
LogError("Fail to get information of pkgmgr's request");
pkgmgr_installer_free(m_handle);
return m_reqType;
}
+
+std::string PkgmgrSignal::getCallerId() const
+{
+ if (!m_initialized) {
+ LogError("PkgmgrSingal not yet intialized");
+ }
+
+ return m_callerId;
+}
} // PackageManager
bool sendSignal(const std::string& key, const std::string& value) const;
std::string getPkgname() const;
int getRequestedType() const;
+ std::string getCallerId() const;
PkgmgrSignal();
virtual ~PkgmgrSignal();
std::string m_type;
std::string m_pkgname;
int m_reqType;
+ std::string m_callerId;
};
} // PackageManager
{
return "";
}
+
+ std::string getCallerId() const
+ {
+ return "";
+ }
};
} // PkgmgrSignalDummy
virtual bool sendSignal(const std::string& key,
const std::string& value) const = 0;
virtual std::string getPkgname() const = 0;
+ virtual std::string getCallerId() const = 0;
virtual ~IPkgmgrSignal(){}
};
} // IPkgmgrSignal