From abea3e279a69e39c1c1a42fefb7cdba8bacb3b78 Mon Sep 17 00:00:00 2001 From: "seungha.son" Date: Thu, 18 Aug 2016 15:41:43 +0900 Subject: [PATCH] Applied API Deprecation Policy Signed-off-by: seungha.son Change-Id: I8e153b851f477d2495500a958738f099a934276b --- CMakeLists.txt | 2 +- include/badge.h | 5 +++-- src/badge.c | 3 +++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0d3bf1f..a386b44 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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}") diff --git a/include/badge.h b/include/badge.h index aa234c9..7414de0 100755 --- a/include/badge.h +++ b/include/badge.h @@ -23,6 +23,8 @@ #ifndef __BADGE_DEF_H__ #define __BADGE_DEF_H__ +#include + #include #include @@ -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; /** diff --git a/src/badge.c b/src/badge.c index 67b4df3..30bee90 100755 --- a/src/badge.c +++ b/src/badge.c @@ -23,6 +23,8 @@ #include #include #include + +#include #include #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()); } -- 2.7.4