Removing GetDefaultFontDescription for Platform Abstraction API 60/48760/7
authorAgnelo Vaz <agnelo.vaz@samsung.com>
Mon, 28 Sep 2015 16:23:35 +0000 (17:23 +0100)
committerAgnelo Vaz <agnelo.vaz@samsung.com>
Tue, 29 Sep 2015 15:36:35 +0000 (16:36 +0100)
* Font Client now provides this functionality, Parsing file showed errors

Change-Id: Ibb16f4f6353d761bf85601dac7c7673c227de2e2
Signed-off-by: Agnelo Vaz <agnelo.vaz@samsung.com>
13 files changed:
automated-tests/packaging/core-dali-adaptor-tests.spec
automated-tests/packaging/core-dali-platform-abstraction-tests.spec
automated-tests/src/dali-adaptor/dali-test-suite-utils/test-platform-abstraction.cpp
automated-tests/src/dali-adaptor/dali-test-suite-utils/test-platform-abstraction.h
build/tizen/adaptor/Makefile.am
build/tizen/configure.ac
packaging/dali-adaptor-mobile.spec
packaging/dali-adaptor.spec
platform-abstractions/tizen/file.list
platform-abstractions/tizen/tizen-font-configuration-parser.cpp [deleted file]
platform-abstractions/tizen/tizen-font-configuration-parser.h [deleted file]
platform-abstractions/tizen/tizen-platform-abstraction.cpp
platform-abstractions/tizen/tizen-platform-abstraction.h

index beddb14..200b2d2 100644 (file)
@@ -12,7 +12,6 @@ Requires: dali
 BuildRequires:  dali-integration-devel
 BuildRequires:  pkgconfig(dali-core)
 BuildRequires:  pkgconfig(dali)
-BuildRequires:  libxml2-devel
 BuildRequires:  cmake
 BuildRequires:  pkgconfig(ecore)
 
index 26183a4..07c66b2 100644 (file)
@@ -12,7 +12,6 @@ Requires: dali
 BuildRequires:  dali-integration-devel
 BuildRequires:  pkgconfig(dali-core)
 BuildRequires:  pkgconfig(dali)
-BuildRequires:  libxml2-devel
 BuildRequires:  cmake
 
 
index a0a3589..d9ea25e 100644 (file)
@@ -150,14 +150,6 @@ bool TestPlatformAbstraction::IsLoading()
 }
 
 /**
- * @copydoc PlatformAbstraction::GetDefaultFontDescription()
- */
-void TestPlatformAbstraction::GetDefaultFontDescription( std::string& family, std::string& style ) const
-{
-  // TODO
-}
-
-/**
  * @copydoc PlatformAbstraction::GetDefaultFontSize()
  */
 int TestPlatformAbstraction::GetDefaultFontSize() const
index ecdda67..bff5de9 100644 (file)
@@ -138,11 +138,6 @@ public:
   virtual bool IsLoading();
 
   /**
-   * @copydoc PlatformAbstraction::GetDefaultFontDescription()
-   */
-  virtual void GetDefaultFontDescription( std::string& family, std::string& style ) const;
-
-  /**
    * @copydoc PlatformAbstraction::GetDefaultFontSize()
    */
   virtual int GetDefaultFontSize() const;
index 0862419..6cdfa75 100644 (file)
@@ -269,7 +269,6 @@ libdali_adaptor_la_CXXFLAGS = \
                       $(ECORE_CFLAGS) \
                       $(ECORE_IPC_CFLAGS) \
                       $(DLOG_CFLAGS) \
-                      $(XML_CFLAGS) \
                       $(VCONF_CFLAGS) \
                       $(EXIF_CFLAGS) \
                       $(MMFSOUND_CFLAGS) \
@@ -292,7 +291,6 @@ libdali_adaptor_la_LIBADD = \
                       $(ELEMENTARY_LIBS) \
                       $(ECORE_IPC_LIBS) \
                       $(DLOG_LIBS) \
-                      $(XML_LIBS) \
                       $(VCONF_LIBS) \
                       $(EXIF_LIBS) \
                       $(TTS_LIBS) \
index dc31079..11d2d3d 100644 (file)
@@ -44,7 +44,6 @@ PKG_CHECK_MODULES(FREETYPE, [freetype2 >= $FREETYPE_REQUIRED])
 PKG_CHECK_MODULES(FREETYPE_BITMAP_SUPPORT, [freetype2 >= $FREETYPE_BITMAP_SUPPORT_VERSION], [ freetype_bitmap_support=yes  ], [ freetype_bitmap_support=no ] )
 PKG_CHECK_MODULES(FONTCONFIG, fontconfig)
 PKG_CHECK_MODULES(PNG, libpng)
-PKG_CHECK_MODULES(XML, libxml-2.0)
 PKG_CHECK_MODULES(LIBEXIF, libexif)
 PKG_CHECK_MODULES(LIBDRM, libdrm)
 PKG_CHECK_MODULES(LIBCURL, libcurl)
index aac7531..2cf53db 100644 (file)
@@ -37,7 +37,6 @@ BuildRequires:  pkgconfig(xdamage)
 BuildRequires:  pkgconfig(utilX)
 BuildRequires:  dali-devel
 BuildRequires:  dali-integration-devel
-BuildRequires:  libxml2-devel
 BuildRequires:  pkgconfig(vconf)
 BuildRequires:  tts-devel
 BuildRequires:  pkgconfig(dlog)
index 01dcc32..cdd7f00 100644 (file)
@@ -52,7 +52,6 @@ BuildRequires:  libjpeg-turbo-devel
 BuildRequires:  pkgconfig(evas)
 BuildRequires:  dali-devel
 BuildRequires:  dali-integration-devel
-BuildRequires:  libxml2-devel
 BuildRequires:  vconf-devel
 BuildRequires:  vconf-keys-devel
 BuildRequires:  tts-devel
index 98711fc..b9efdd8 100755 (executable)
@@ -3,7 +3,6 @@
 tizen_platform_abstraction_src_files = \
   $(tizen_platform_abstraction_src_dir)/tizen-platform-abstraction.cpp \
   $(tizen_platform_abstraction_src_dir)/tizen-logging.cpp \
-  $(tizen_platform_abstraction_src_dir)/tizen-font-configuration-parser.cpp \
   \
   $(tizen_platform_abstraction_src_dir)/resource-loader/resource-loader.cpp \
   $(tizen_platform_abstraction_src_dir)/resource-loader/resource-requester-base.cpp \
diff --git a/platform-abstractions/tizen/tizen-font-configuration-parser.cpp b/platform-abstractions/tizen/tizen-font-configuration-parser.cpp
deleted file mode 100644 (file)
index a1dc8f7..0000000
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#include "tizen-font-configuration-parser.h"
-
-#include <sstream>
-#include <libxml/xmlmemory.h>
-#include <libxml/parser.h>
-
-#include <dali/integration-api/debug.h>
-
-namespace Dali
-{
-
-namespace TizenPlatform
-{
-
-namespace FontConfigurationParser
-{
-
-#if defined(DEBUG_ENABLED)
-namespace
-{
-Debug::Filter* gLogFilter = Debug::Filter::New(Debug::NoLogging, false, "LOG_TIZEN_FONT_CONFIGURATION_PARSER");
-}
-#endif
-
-void Parse(std::string confFile, std::string& fontFamily, std::string& fontStyle)
-{
-  bool familyParsed(false);
-  bool styleParsed(false);
-
-  if ( !confFile.empty() )
-  {
-    xmlDocPtr doc = xmlParseFile(confFile.c_str());
-    if(doc == NULL)
-    {
-      DALI_LOG_ERROR("Document %s not parsed successfully.\n", confFile.c_str());
-      return;
-    }
-
-    xmlNodePtr cur = xmlDocGetRootElement(doc);
-    if(cur == NULL)
-    {
-      DALI_LOG_ERROR("%s is Empty\n", confFile.c_str());
-      xmlFreeDoc(doc);
-      return;
-    }
-
-    if(xmlStrcmp(cur->name, (const xmlChar *)"fontconfig"))
-    {
-      DALI_LOG_ERROR("Document %s is of the wrong type, root node != fontconfig\n", confFile.c_str());
-      xmlFreeDoc(doc);
-      return;
-    }
-
-    cur = cur->xmlChildrenNode;
-
-    while(cur != NULL && !(familyParsed && styleParsed))
-    {
-      if((!xmlStrcmp(cur->name, (const xmlChar *)"match")))
-      {
-        xmlNodePtr cur2 = cur->xmlChildrenNode;
-        while(cur2 != NULL && !(familyParsed && styleParsed))
-        {
-          if((!xmlStrcmp(cur2->name, (const xmlChar *)"edit")))
-          {
-            xmlChar* xmlValue = xmlGetProp( cur2, (const xmlChar *)"name" );
-            if((!xmlStrcmp(xmlValue, (const xmlChar *)"family")))
-            {
-              xmlNodePtr cur3 = cur2->xmlChildrenNode;
-              while(cur3 != NULL && !(familyParsed && styleParsed))
-              {
-                if((!xmlStrcmp(cur3->name, (const xmlChar *)"string")))
-                {
-                  xmlChar* key = xmlNodeListGetString(doc, cur3->xmlChildrenNode, 1);
-                  DALI_LOG_INFO(gLogFilter,Debug::Concise, "Document %s uses the following font family as default: %s\n", confFile.c_str(), key);
-                  std::stringstream str;
-                  str << key;
-                  fontFamily = str.str();
-                  xmlFree(key);
-                  familyParsed = true;
-                  break;
-                }
-                cur3 = cur3->next;
-              }
-            }
-            else if((!xmlStrcmp(xmlValue, (const xmlChar *)"style")))
-            {
-              xmlNodePtr cur3 = cur2->xmlChildrenNode;
-              while(cur3 != NULL && !(familyParsed && styleParsed))
-              {
-                if((!xmlStrcmp(cur3->name, (const xmlChar *)"string")))
-                {
-                  xmlChar* key = xmlNodeListGetString(doc, cur3->xmlChildrenNode, 1);
-                  DALI_LOG_INFO(gLogFilter,Debug::Concise, "Document %s uses the following font style as default: %s\n", confFile.c_str(), key);
-                  std::stringstream str;
-                  str << key;
-                  fontStyle = str.str();
-                  xmlFree(key);
-                  styleParsed = true;
-                  break;
-                }
-                cur3 = cur3->next;
-              }
-            }
-            xmlFree( xmlValue );
-          }
-          cur2 = cur2->next;
-        }
-      }
-      cur = cur->next;
-    }
-
-    xmlFreeDoc(doc);
-  }
-}
-
-} // namespace FontConfParser
-
-} // namespace TizenPlatform
-
-} // namespace Dali
diff --git a/platform-abstractions/tizen/tizen-font-configuration-parser.h b/platform-abstractions/tizen/tizen-font-configuration-parser.h
deleted file mode 100644 (file)
index 2450e71..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-#ifndef __DALI_TIZEN_PLATFORM_FONT_CONFIGURATION_PARSER_H__
-#define __DALI_TIZEN_PLATFORM_FONT_CONFIGURATION_PARSER_H__
-
-/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#include <string>
-
-namespace Dali
-{
-
-namespace TizenPlatform
-{
-
-namespace FontConfigurationParser
-{
-
-/**
- * Parses the given font configuration file and sets fontFamily accordingly.
- * @param[in]   confFile    The configuration file to parse.
- * @param[out]  fontFamily  This gets set with the default font family specified in the conf file.
- * @param[out]  fontStyle   This gets set with the default font style specified in the conf file.
- */
-void Parse(std::string confFile, std::string& fontFamily, std::string& fontStyle);
-
-} // namespace FontConfParser
-
-} // namespace TizenPlatform
-
-} // namespace Dali
-
-#endif // __DALI_TIZEN_PLATFORM_FONT_CONFIGURATION_PARSER_H__
index 0cca389..26debc0 100644 (file)
@@ -28,7 +28,6 @@
 
 // INTERNAL INCLUDES
 #include "resource-loader/resource-loader.h"
-#include "tizen-font-configuration-parser.h"
 #include "image-loaders/image-loader.h"
 #include "portable/file-closer.h"
 
@@ -84,11 +83,6 @@ void TizenPlatformAbstraction::Resume()
   }
 }
 
-void TizenPlatformAbstraction::GetDefaultFontDescription( std::string& fontFamily, std::string& fontStyle ) const
-{
-  FontConfigurationParser::Parse(FONT_CONFIGURATION_FILE, fontFamily, fontStyle);
-}
-
 int TizenPlatformAbstraction::GetDefaultFontSize() const
 {
   int fontSize( -1 );
index 0705623..99c54a9 100644 (file)
@@ -121,11 +121,6 @@ public: // PlatformAbstraction overrides
   virtual void JoinLoaderThreads();
 
   /**
-   * @copydoc PlatformAbstraction::GetDefaultFontDescription()
-   */
-  virtual void GetDefaultFontDescription( std::string& family, std::string& style ) const;
-
-  /**
    * @copydoc PlatformAbstraction::GetDefaultFontSize()
    */
   virtual int GetDefaultFontSize() const;