SET(MAJOR_VER 0)
SET(VERSION ${MAJOR_VER}.1.0)
-# ADD_SUBDIRECTORY(test-app)
+ADD_SUBDIRECTORY(test-app)
SET(SRCS
./src/notification.c
Version: 0.2.25
Release: 1
Group: TBD
-License: Apache
+License: Apache License, Version 2.0
Source0: %{name}-%{version}.tar.gz
BuildRequires: pkgconfig(sqlite3)
BuildRequires: pkgconfig(db-util)
SET(VISIBILITY "-DEXPORT_API=\"__attribute__((visibility(\\\"default\\\")))\"")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${VISIBILITY} -fvisibility=hidden")
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wl,--gc-sections")
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wl,--gc-sections -fPIC")
##########################################################
# Define Test App
ENDFOREACH(flag)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
-SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -pie")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -pie ")
ADD_EXECUTABLE(notification-test-app ${TEST-APP-SRCS})
TARGET_LINK_LIBRARIES(notification-test-app ${test_app_pkgs_LDFLAGS} notification)
testapp_print (" 2. Post simple notifications repeatedly\n");
testapp_print (" 3. Post a notification on indicator\n");
testapp_print (" 4. Post status status message\n");
+ testapp_print (" 5. Delete all notification\n");
testapp_print ("------------------------------------------\n");
break;
default:
return noti_err;
}
+static int testapp_test_delete_all_notifications()
+{
+ int noti_err = NOTIFICATION_ERROR_NONE;
+ noti_err = notification_delete_all(NOTIFICATION_TYPE_NOTI);
+
+ testapp_print("notification_delete_all returns[%d]", noti_err);
+
+ return noti_err;
+}
static gboolean testapp_interpret_command_basic_test (int selected_number)
{
testapp_test_post_status_message();
break;
+ case 5:
+ testapp_test_delete_all_notifications();
+ break;
+
case 0:
go_to_loop = FALSE;
break;