Applied API Deprecation Policy 41/84341/2 accepted/tizen/common/20160822.132755 accepted/tizen/common/20160823.132653 accepted/tizen/ivi/20160824.021628 accepted/tizen/mobile/20160824.021518 accepted/tizen/tv/20160824.021547 accepted/tizen/wearable/20160824.021653 submit/tizen/20160822.060035 submit/tizen/20160822.060113
authorseungha.son <seungha.son@samsung.com>
Thu, 18 Aug 2016 06:41:43 +0000 (15:41 +0900)
committerseungha.son <seungha.son@samsung.com>
Thu, 18 Aug 2016 07:33:51 +0000 (16:33 +0900)
Signed-off-by: seungha.son <seungha.son@samsung.com>
Change-Id: I8e153b851f477d2495500a958738f099a934276b

CMakeLists.txt
include/badge.h
src/badge.c

index 0d3bf1f..a386b44 100755 (executable)
@@ -51,7 +51,7 @@ FOREACH(flag ${pkgs_CFLAGS})
        SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
 ENDFOREACH(flag)
 
-SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fvisibility=hidden -g -Wall -O2")
+SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fvisibility=hidden -g -Wall -Werror -Wno-error=deprecated-declarations -O2")
 
 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
 
index aa234c9..7414de0 100755 (executable)
@@ -23,6 +23,8 @@
 #ifndef __BADGE_DEF_H__
 #define __BADGE_DEF_H__
 
+#include <tizen.h>
+
 #include <stdbool.h>
 #include <badge_error.h>
 
@@ -70,8 +72,7 @@ extern "C" {
 }
  * @endcode
  */
-int badge_new(const char *writable_app_id);
-
+int badge_new(const char *writable_app_id) TIZEN_DEPRECATED_API;
 
 
 /**
index 67b4df3..30bee90 100755 (executable)
@@ -23,6 +23,8 @@
 #include <stdlib.h>
 #include <stdarg.h>
 #include <unistd.h>
+
+#include <dlog.h>
 #include <package_manager.h>
 
 #include "badge.h"
@@ -40,6 +42,7 @@ int badge_create(const char *pkgname, const char *writable_pkg)
 EXPORT_API
 int badge_new(const char *writable_app_id)
 {
+       dlog_print(DLOG_WARN, LOG_TAG, "DEPRECATION WARNING: badge_new() is deprecated and will be removed from next release. Use badge_add() instead.");
        return badge_new_for_uid(writable_app_id, getuid());
 }