#include <FIoDirectory.h>
#include <FBase_StringConverter.h>
#include <FAppPkg_PackageInfoImpl.h>
+#include <FSysSystemTime.h>
#include "InstallerManager.h"
#include "GuestInstaller.h"
,__pInstaller(null)
,__errorType(0)
,__operation(INSTALLER_OPERATION_INSTALL)
+,__startTick(0)
+,__endTick(0)
{
}
InstallerManager* pInstallManager = null;
PackageId packageId;
+ Tizen::System::SystemTime::GetTicks(__startTick);
+
AppLogTag(OSP_INSTALLER, "------------------------------------------");
AppLogTag(OSP_INSTALLER, "InstallerManager::Request");
AppLogTag(OSP_INSTALLER, "------------------------------------------");
AppLogTag(OSP_INSTALLER, "------------------------------------------");
AppLogTag(OSP_INSTALLER, "# id = [%S]", pPackageInfoImpl->GetId().GetPointer());
AppLogTag(OSP_INSTALLER, "# version = [%S]", pPackageInfoImpl->GetAppVersion().GetPointer());
- AppLogTag(OSP_INSTALLER, "# secret = [%S]", pPackageInfoImpl->GetAppSecret().GetPointer());
AppLogTag(OSP_INSTALLER, "# name = [%S]", pPackageInfoImpl->GetAppName().GetPointer());
AppLogTag(OSP_INSTALLER, "# vendor = [%S]", pPackageInfoImpl->GetAppVendor().GetPointer());
AppLogTag(OSP_INSTALLER, "# description = [%S]", pPackageInfoImpl->GetAppDescription().GetPointer());
int errorType = GetErrorType();
InstallerOperation operation = GetInstallerOperation();
+ Tizen::System::SystemTime::GetTicks(__endTick);
+
AppLogTag(OSP_INSTALLER, "==========================================");
AppLogTag(OSP_INSTALLER, "%s Result", (operation == INSTALLER_OPERATION_INSTALL)?"Installation":"Uninstallation");
AppLogTag(OSP_INSTALLER, " # %s", OSP_INSTALLER_VERSION);
AppLogTag(OSP_INSTALLER, " # AppId = [%ls], errorType = [%d]", appId.GetPointer(), errorType);
AppLogTag(OSP_INSTALLER, " # result = [%s]", (errorType == 0)?"Success":"Failure");
+ AppLogTag(OSP_INSTALLER, " # operation time = [%d](start=%d, end=%d)", (int)(__endTick-__startTick), (int)__startTick, (int)__endTick);
AppLogTag(OSP_INSTALLER, "==========================================");
fprintf(stderr, " # AppId = [%ls], errorType = [%d]\n", appId.GetPointer(), errorType);
fprintf(stderr, " # operation = [%s]\n", (operation == INSTALLER_OPERATION_INSTALL)?"Installation":"Uninstallation");
fprintf(stderr, " # result = [%s]\n", (errorType == 0)?"Success":"Failure");
+ fprintf(stderr, " # operation time = [%d] ms(start=%d, end=%d)\n", (int)(__endTick-__startTick), (int)__startTick, (int)__endTick);
}
const PackageId&
WriteLiveboxes(pAppInfoImpl);
}
+ WriteAccounts(index);
+
return true;
}
return true;
}
+bool
+ManifestGenerator::WriteAccounts(int index)
+{
+ _PackageInfoImpl *pPackageInfoImpl = __pContext->GetPackageInfoImpl();
+
+ IListT<AppData*>* pAppDataList = __pContext->__pAppDataList;
+ TryReturn(pAppDataList, false, "[osp-installer] pAppDataList is null");
+
+ AppData* pAppData = null;
+ pAppDataList->GetAt(index, pAppData);
+ TryReturn(pAppData, false, "[osp-installer] pAppData is null");
+
+ IListT<AccountData*>* pAccountDataList = pAppData->__pAccountDataList;
+ TryReturn(pAccountDataList, false, "[osp-installer] pAccountDataList is null");
+
+ int accountCount = pAccountDataList->GetCount();
+ if (accountCount == 0)
+ {
+ return true;
+ }
+
+ __pWriter->StartElement("Accounts");
+
+ for (int i = 0; i < accountCount; i++)
+ {
+ __pWriter->StartElement("AccountProvider");
+
+ AccountData* pAccountData = null;
+ pAccountDataList->GetAt(i, pAccountData);
+ TryReturn(pAccountData, false, "[osp-installer] pAccountData is null");
+
+ __pWriter->WriteAttribute("ProviderId", pAccountData->__providerId);
+ __pWriter->WriteAttribute("MultipleAccountsSupport", pAccountData->__multipleAccountsSupport);
+
+ String accountIcon = pAccountData->__accountIcon;
+ if (accountIcon.IsEmpty() == false)
+ {
+ String accountIconPath;
+ accountIconPath.Format(1024, L"%ls%ls/%ls", pPackageInfoImpl->GetAppRootPath().GetPointer(), DIR_SHARED_RES, accountIcon.GetPointer());
+
+ __pWriter->StartElement("account-icon");
+ __pWriter->WriteString(accountIconPath);
+ __pWriter->EndElement();
+ }
+
+ String accountSmallIcon = pAccountData->__accountSmallIcon;
+ if (accountSmallIcon.IsEmpty() == false)
+ {
+ String accountSmallIconPath;
+ accountSmallIconPath.Format(1024, L"%ls%ls/%ls", pPackageInfoImpl->GetAppRootPath().GetPointer(), DIR_SHARED_RES, accountSmallIcon.GetPointer());
+
+ __pWriter->StartElement("account-small-icon");
+ __pWriter->WriteString(accountSmallIcon);
+ __pWriter->EndElement();
+ }
+
+ WriteLanguageValue(pAccountData->__pNameList, L"label");
+
+ __pWriter->EndElement(); // end of "AccountProvider"
+ }
+
+ __pWriter->EndElement(); // end of "Accounts"
+
+ return true;
+}