{
row.Set_app_id(*handle);
}
- row.Set_widget_type(regInfo.type.appType);
+
+ if (regInfo.webAppType == APP_TYPE_UNKNOWN && regInfo.type !=
+ APP_TYPE_UNKNOWN) {
+ // TODO : regInfo.type is temporary code for security.
+ // This code will be removed.
+ row.Set_widget_type(regInfo.type.appType);
+ } else {
+ row.Set_widget_type(regInfo.webAppType.appType);
+ }
row.Set_widget_id(widgetConfigurationInfo.widget_id);
row.Set_defaultlocale(widgetConfigurationInfo.defaultlocale);
row.Set_widget_version(widgetConfigurationInfo.version);
row.Set_back_supported(widgetConfigurationInfo.backSupported);
row.Set_access_network(widgetConfigurationInfo.accessNetwork);
row.Set_pkgname(regInfo.pkgname);
- row.Set_pkg_type(regInfo.pType.pkgType);
+ row.Set_pkg_type(regInfo.packagingType.pkgType);
Try
{
SQL_CONNECTION_EXCEPTION_HANDLER_END("Failed to get access host list")
}
-PkgType WidgetDAOReadOnly::getPkgType() const
+PackagingType WidgetDAOReadOnly::getPackagingType() const
{
WidgetInfoRow row = getWidgetInfoRow(m_widgetHandle);
DPL::OptionalInt result = row.Get_pkg_type();
- return PkgType(static_cast<PackagingType>(*result));
+ return PackagingType(static_cast<PkgType>(*result));
}
void WidgetDAOReadOnly::getEncryptedFileList(EncryptedFileList& filesList) const
{
return appType == other;
}
+ bool operator!= (const AppType& other) const
+ {
+ return appType != other;
+ }
std::string getApptypeToString()
{
switch (appType) {
*
* Package type describes belowed in Tizen webapp, C++ service App
*/
-enum PackagingType
+enum PkgType
{
PKG_TYPE_UNKNOWN = 0, // unknown
- PKG_TYPE_TIZEN_WEBAPP, // Tizen webapp
- PKG_TYPE_TIZEN_WITHSVCAPP // Tizen webapp with C++ service app
+ PKG_TYPE_NOMAL_WEB_APP,
+ PKG_TYPE_HOSTED_WEB_APP, // request from browser
+ PKG_TYPE_HYBRID_WEB_APP, // Tizen webapp with C++ service app
};
-class PkgType
+class PackagingType
{
public:
- PkgType()
+ PackagingType()
:pkgType(PKG_TYPE_UNKNOWN)
{
}
- PkgType(const PackagingType type)
+ PackagingType(const PkgType type)
:pkgType(type)
{
}
- bool operator== (const PackagingType& other) const
+ bool operator== (const PkgType& other) const
{
return pkgType == other;
}
+ bool operator!= (const PkgType& other) const
+ {
+ return pkgType != other;
+ }
std::string getPkgtypeToString()
{
switch (pkgType) {
#define X(x) case x: return #x;
X(PKG_TYPE_UNKNOWN)
- X(PKG_TYPE_TIZEN_WEBAPP)
- X(PKG_TYPE_TIZEN_WITHSVCAPP)
+ X(PKG_TYPE_NOMAL_WEB_APP)
+ X(PKG_TYPE_HOSTED_WEB_APP)
+ X(PKG_TYPE_HYBRID_WEB_APP)
#undef X
default:
return "UNKNOWN";
}
}
- PackagingType pkgType;
+ PkgType pkgType;
};
} // namespace WrtDB
//Constructor
WidgetRegisterInfo() :
- type(APP_TYPE_UNKNOWN),
+ webAppType(APP_TYPE_UNKNOWN),
signatureType(SIGNATURE_TYPE_UNIDENTIFIED),
isTestWidget(0),
configInfo(),
- pType(PKG_TYPE_UNKNOWN)
+ packagingType(PKG_TYPE_UNKNOWN)
{
}
- WidgetType type;
+ WidgetType webAppType;
+ WidgetType type; // TODO : This type will be removed.
DPL::OptionalString guid;
DPL::OptionalString version;
DPL::OptionalString minVersion;
LocalizationData localizationData;
DPL::OptionalString pkgname;
time_t installedTime;
- PkgType pType;
+ PackagingType packagingType;
EncryptedFileList encryptedFiles;
ExternalLocationList externalLocations;
};
/**
* This method returns the type of the package.
*
- * @return PkgType
+ * @return PackagingType
* @exception WRT_CONF_ERR_EMDB_FAILURE - Fail to query DB table.
* @exception WRT_CONF_ERR_EMDB_NO_RECORD - Can not find matching
records in DB table.
*/
- PkgType getPkgType() const;
+ PackagingType getPackagingType() const;
void getEncryptedFileList(EncryptedFileList& filesList) const;