Merge remote-tracking branch 'rsa/tizen_2.2' into tizen accepted/tizen/20131014.132013 accepted/tizen/20131014.170403 accepted/tizen/20131014.182805 submit/tizen/20131014.114835 submit/tizen/20131014.115253
authorHoseon LEE <hoseon46.lee@samsung.com>
Mon, 14 Oct 2013 10:49:09 +0000 (19:49 +0900)
committerHoseon LEE <hoseon46.lee@samsung.com>
Mon, 14 Oct 2013 10:49:15 +0000 (19:49 +0900)
Conflicts:
packaging/wrt-commons.spec

modules/core/config.cmake
modules/core/include/dpl/auto_ptr.h
modules/core/include/dpl/availability.h [new file with mode: 0644]
modules/utils/src/warp_iri.cpp
packaging/wrt-commons.spec

index 33f25ea..774f8fe 100644 (file)
@@ -85,6 +85,7 @@ SET(DPL_CORE_HEADERS
     ${PROJECT_SOURCE_DIR}/modules/core/include/dpl/assert.h
     ${PROJECT_SOURCE_DIR}/modules/core/include/dpl/atomic.h
     ${PROJECT_SOURCE_DIR}/modules/core/include/dpl/auto_ptr.h
+    ${PROJECT_SOURCE_DIR}/modules/core/include/dpl/availability.h
     ${PROJECT_SOURCE_DIR}/modules/core/include/dpl/binary_queue.h
     ${PROJECT_SOURCE_DIR}/modules/core/include/dpl/bool_operator.h
     ${PROJECT_SOURCE_DIR}/modules/core/include/dpl/char_traits.h
index f5838d8..3d23091 100644 (file)
@@ -27,6 +27,8 @@
 #include <set>
 #include <string>
 
+#include <dpl/availability.h>
+
 namespace DPL {
 /*
  * base deleter func
@@ -48,7 +50,7 @@ template <typename T>
 class AutoPtr
 {
   public:
-    AutoPtr(T *ptr) :
+    DPL_DEPRECATED_WITH_MESSAGE("use std::unique_ptr or std::shared_ptr") AutoPtr(T *ptr) :
         m_data(ptr)
     {}
 
diff --git a/modules/core/include/dpl/availability.h b/modules/core/include/dpl/availability.h
new file mode 100644 (file)
index 0000000..f20c5df
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2013 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ *    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.
+ */
+/*
+ * @file        availability.h
+ * @author      Jihoon Chung (jihoon.chung@samsung.com)
+ * @version     1.0
+ */
+#ifndef DPL_AVAILABILITY_H
+#define DPL_AVAILABILITY_H
+
+#define DPL_DEPRECATED __attribute__((deprecated))
+#define DPL_DEPRECATED_WITH_MESSAGE(msg) __attribute__((deprecated(msg)))
+
+#endif // DPL_AVAILABILITY_H
index a08551f..bd8650a 100644 (file)
  */
 #include <stddef.h>
 #include <list>
+#include <memory>
 #include <set>
 #include <string>
 #include <dpl/utils/warp_iri.h>
 #include <dpl/string.h>
-#include <dpl/auto_ptr.h>
 #include <dpl/foreach.h>
 #include <idna.h>
 #include <istream>
@@ -49,13 +49,6 @@ const DPL::String SCHEMA_HTTPS = DPL::FromUTF8String("https");
 const DPL::String SCHEMA_FTP = DPL::FromUTF8String("ftp");
 } // namespace anonymous
 
-// This will create AutoPtr deleter for iri_struct.
-// Deleter must be in the same namespace as definition of AutoPtr.
-
-namespace DPL {
-DECLARE_DELETER(iri_struct, iri_destroy)
-} // namespace DPL
-
 WarpIRI::WarpIRI() :
     m_domain(false),
     m_port(UNKNOWN_PORT),
@@ -79,8 +72,7 @@ void WarpIRI::set(const char *p_iri,
     if (strcmp(p_iri, "*") == 0) {
         return;
     }
-
-    DPL::AutoPtr<iri_struct> iri(iri_parse(p_iri));
+    std::unique_ptr<iri_struct, decltype(&iri_destroy)> iri(iri_parse(p_iri), iri_destroy);
 
     if (!iri.get()) {
         LogError("Error in iri_parse!");
index f958838..e8ae047 100644 (file)
@@ -1,6 +1,6 @@
 Name:       wrt-commons
 Summary:    Wrt common library
-Version:    0.2.153
+Version:    0.2.157
 Release:    1
 Group:      System/Libraries
 License:    Apache-2.0
@@ -79,29 +79,32 @@ mkdir -p /opt/share/widget/exec
 mkdir -p /opt/share/widget/data/Public
 mkdir -p %{_libdir}/wrt-plugins
 
-if [ -z ${2} ]; then
-    echo "This is new install of wrt-commons"
-    echo "Calling /usr/bin/wrt_commons_create_clean_db.sh"
-    /usr/bin/wrt_commons_create_clean_db.sh
-else
-    # Find out old and new version of databases
-    WRT_OLD_DB_VERSION=`sqlite3 /opt/dbspace/.wrt.db ".tables" | grep "DB_VERSION_"`
-    WRT_NEW_DB_VERSION=`cat /usr/share/wrt-engine/wrt_db.sql | tr '[:blank:]' '\n' | grep DB_VERSION_`
-    echo "OLD wrt database version ${WRT_OLD_DB_VERSION}"
-    echo "NEW wrt database version ${WRT_NEW_DB_VERSION}"
-
-    if [ ${WRT_OLD_DB_VERSION} -a ${WRT_NEW_DB_VERSION} ]
-    then
-        if [ ${WRT_NEW_DB_VERSION} = ${WRT_OLD_DB_VERSION} ]
+#Don't reset DB when install on QEMU (during other packages building witch GBS)
+if [ -z "$EMULATOR_ARCHS" ]; then
+    if [ -z ${2} ]; then
+        echo "This is new install of wrt-commons"
+        echo "Calling /usr/bin/wrt_commons_reset_db.sh"
+        /usr/bin/wrt_commons_reset_db.sh
+    else
+        # Find out old and new version of databases
+        WRT_OLD_DB_VERSION=`sqlite3 /opt/dbspace/.wrt.db ".tables" | grep "DB_VERSION_"`
+        WRT_NEW_DB_VERSION=`cat /usr/share/wrt-engine/wrt_db.sql | tr '[:blank:]' '\n' | grep DB_VERSION_`
+        echo "OLD wrt database version ${WRT_OLD_DB_VERSION}"
+        echo "NEW wrt database version ${WRT_NEW_DB_VERSION}"
+
+        if [ ${WRT_OLD_DB_VERSION} -a ${WRT_NEW_DB_VERSION} ]
         then
-            echo "Equal database detected so db installation ignored"
+            if [ ${WRT_NEW_DB_VERSION} = ${WRT_OLD_DB_VERSION} ]
+            then
+                echo "Equal database detected so db installation ignored"
+            else
+                echo "Calling /usr/bin/wrt_commons_reset_db.sh"
+                /usr/bin/wrt_commons_reset_db.sh
+            fi
         else
             echo "Calling /usr/bin/wrt_commons_reset_db.sh"
             /usr/bin/wrt_commons_reset_db.sh
         fi
-    else
-        echo "Calling /usr/bin/wrt_commons_reset_db.sh"
-        /usr/bin/wrt_commons_reset_db.sh
     fi
 fi