Make info file for ScreenReader
authorDuyoung Jang <duyoung.jang@samsung.com>
Tue, 9 Jul 2013 07:24:49 +0000 (16:24 +0900)
committerDuyoung Jang <duyoung.jang@samsung.com>
Tue, 9 Jul 2013 07:25:59 +0000 (16:25 +0900)
Change-Id: I29532ccbad943e12249a0b0c8a20feef091c1ff4
Signed-off-by: Duyoung Jang <duyoung.jang@samsung.com>
inc/InstallerDefs.h
src/Context/InstallationContext.cpp
src/Context/InstallationContext.h
src/Manager/ConfigurationManager.cpp
src/XmlHandler/ManifestHandler.cpp
src/XmlHandler/ManifestHandler.h

index 4673744..70240e1 100755 (executable)
@@ -23,7 +23,7 @@
 
 #include "InstallerUtil.h"
 
-#define OSP_INSTALLER_VERSION "version=[20130709.1]"
+#define OSP_INSTALLER_VERSION "version=[20130709.2]"
 
 #define DIR_BIN                                L"/bin"
 #define DIR_INFO                       L"/info"
@@ -63,6 +63,7 @@
 #define VIRTUAL_ROOT_INFO_FILE         L"/info/virtualroot.info"
 #define UISCALABILITY_INFO_FILE                L"/uiscalability.info"
 #define UITHEME_INFO_FILE                                      L"/uitheme.info"
+#define DISABLE_SCREEN_READER_INFO_FILE                                        L"/disablescreenreader.info"
 #define WEBSERVICE_INFO_FILE           L"/info/webservice.info"
 #define TYPE_INFO_FILE                         L"/info/type.info"
 #define PACKAGE_XML_FILE                       L"/info/manifest.xml"
index 27b6bf8..0d9669f 100755 (executable)
@@ -68,7 +68,6 @@ InstallationContext::InstallationContext(void)
 ,__pAuthorCertList(null)
 ,__pDistributorCertList(null)
 ,__pDistributorCertList2(null)
-,__pSymbolicLinkList(null)
 ,__certType(0)
 ,__pPkgmgrInstaller(null)
 {
@@ -128,13 +127,6 @@ InstallationContext::~InstallationContext(void)
                delete __pDistributorCertList2;
                __pDistributorCertList2 = null;
        }
-
-       if (__pSymbolicLinkList)
-       {
-               __pSymbolicLinkList->RemoveAll();
-               delete __pSymbolicLinkList;
-               __pSymbolicLinkList = null;
-       }
 }
 
 InstallerError
@@ -152,10 +144,6 @@ InstallationContext::Construct(void)
        __pDistributorCertList2 = new (std::nothrow) ArrayListT<String*>;
        TryReturn(__pDistributorCertList2, INSTALLER_ERROR_OUT_OF_MEMORY, "__pDistributorCertList2 is null.");
 
-       __pSymbolicLinkList = new (std::nothrow) MultiHashMapT<String*, String*>;
-       TryReturn(__pSymbolicLinkList, INSTALLER_ERROR_OUT_OF_MEMORY, "__pSymbolicLinkList is null.");
-       __pSymbolicLinkList->Construct();
-
        return INSTALLER_ERROR_NONE;
 }
 
index 69bbc7f..b8058cf 100755 (executable)
@@ -121,8 +121,6 @@ public:
        Tizen::Base::Collection::ArrayListT<Tizen::Base::String *>* __pDistributorCertList;
        Tizen::Base::Collection::ArrayListT<Tizen::Base::String *>* __pDistributorCertList2;
 
-       Tizen::Base::Collection::MultiHashMapT<Tizen::Base::String*, Tizen::Base::String*>* __pSymbolicLinkList;
-
        Tizen::Base::String __coreXmlPath;
        Tizen::Base::String __inputPath;
        Tizen::Base::String __packagePath;
index 0cfb880..84b44b1 100755 (executable)
@@ -996,5 +996,18 @@ ConfigurationManager::CreateAppInfoFile(AppData* pAppData, const String& rootPat
                }
        }
 
+       HashMap* pMetadataMap = pAppData->__pMetadataMap;
+       if (pMetadataMap)
+       {
+               String screenReaderOff(METADATA_DISABLE_SCREEN_READER);
+               if (pMetadataMap->ContainsKey(screenReaderOff) == true)
+               {
+                       String screenReaderOffInfoFile;
+                       screenReaderOffInfoFile.Format(1024, L"%ls%ls", appFolder.GetPointer(), DISABLE_SCREEN_READER_INFO_FILE);
+
+                       InstallerUtil::CreateInfoFile(screenReaderOffInfoFile, null);
+               }
+       }
+
        return true;
 }
index e5966e0..90599ba 100755 (executable)
@@ -168,13 +168,9 @@ ManifestHandler::OnStartElement(const char *pName)
        {
                status = OnPermissionStartElement(pName);
        }
-       else if (strcasecmp(pName, "DirectoryConfig") == 0)
+       else if (strcasecmp(pName, "VirtualEnvironment") == 0)
        {
-               status = OnDirectoryConfigStartElement();
-       }
-       else if (strcasecmp(pName, "SymbolicLink") == 0)
-       {
-               status = OnSymbolicLinkStartElement();
+               status = OnVirtualEnvironmentStartElement();
        }
 
        if (!status)
@@ -631,39 +627,20 @@ ManifestHandler::OnMetadataStartElement()
 }
 
 bool
-ManifestHandler::OnDirectoryConfigStartElement()
+ManifestHandler::OnVirtualEnvironmentStartElement()
 {
        XmlAttribute* pAttr = GetAttribute();
        TryReturn(pAttr, true, "pAttr is null.");
 
-       char* pVirtualRoot = pAttr->Find("VirtualRoot");
-       TryReturn(pVirtualRoot, false, "pVirtualRoot is null.");
+       char* pVirtualRootPath = pAttr->Find("VirtualRootPath");
+       TryReturn(pVirtualRootPath, false, "pVirtualRootPath is null.");
 
-       if (strcasecmp(pVirtualRoot, "true") == 0)
+       if (strcasecmp(pVirtualRootPath, "true") == 0)
        {
                __pContext->__isVirtualRoot = true;
        }
 
-       AppLog("<DirectoryConfig VirtualRoot=\"%s\">", pVirtualRoot);
-
-       return true;
-}
-
-bool
-ManifestHandler::OnSymbolicLinkStartElement()
-{
-       XmlAttribute* pAttr = GetAttribute();
-       TryReturn(pAttr, true, "pAttr is null.");
-
-       char* pSource = pAttr->Find("Source");
-       TryReturn(pSource, false, "pSource is null.");
-
-       char* pDestination = pAttr->Find("Destination");
-       TryReturn(pDestination, false, "pDestination is null.");
-
-       __pContext->__pSymbolicLinkList->Add(new (std::nothrow) String(pSource), new (std::nothrow) String(pDestination));
-
-       AppLog("<SymbolicLink Source=\"%s\", Destination=\"%s\">", pSource, pDestination);
+       AppLog("<VirtualEnvironment VirtualRootPath=\"%s\">", pVirtualRootPath);
 
        return true;
 }
index 4fdfe48..88033da 100755 (executable)
@@ -78,8 +78,7 @@ private:
        bool OnContentStartElement(void);
 
        bool OnMetadataStartElement(void);
-       bool OnDirectoryConfigStartElement(void);
-       bool OnSymbolicLinkStartElement(void);
+       bool OnVirtualEnvironmentStartElement(void);
 
        // Parsers
        bool OnLiveboxesStartElement(const char* pName);