--- /dev/null
+#!/bin/sh
+
+export TET_INSTALL_PATH=$HOME/git/tetware/TETware # local tetware path
+export TET_TARGET_PATH=$TET_INSTALL_PATH/tetware-target
+export PATH=$TET_TARGET_PATH/bin:$PATH
+export LD_LIBRARY_PATH=$TET_TARGET_PATH/lib/tet3:$LD_LIBRARY_PATH
+export TET_ROOT=$TET_TARGET_PATH
+
+export TET_SUITE_ROOT=`pwd`
+FILE_NAME_EXTENSION=`date +%s`
+
+RESULT_DIR=results
+HTML_RESULT=$RESULT_DIR/build-tar-result-$FILE_NAME_EXTENSION.html
+JOURNAL_RESULT=$RESULT_DIR/build-tar-result-$FILE_NAME_EXTENSION.journal
+
+mkdir -p $RESULT_DIR
+
+tcc -c -p ./
+tcc -b -j $JOURNAL_RESULT -p ./
+grw -c 3 -f chtml -o $HTML_RESULT $JOURNAL_RESULT
--- /dev/null
+#!/bin/sh
+export TET_INSTALL_PATH=/mnt/nfs/git/tetware/TETware
+export TET_TARGET_PATH=$TET_INSTALL_PATH/tetware-target
+export PATH=$TET_TARGET_PATH/bin:$PATH
+export LD_LIBRARY_PATH=$TET_TARGET_PATH/lib/tet3:$LD_LIBRARY_PATH
+
+export TET_ROOT=$TET_TARGET_PATH
+
+export TET_SUITE_ROOT=`pwd`
+FILE_NAME_EXTENSION=`date +%s`
+
+RESULT_DIR=results
+HTML_RESULT=$RESULT_DIR/exec-tar-result-$FILE_NAME_EXTENSION.html
+JOURNAL_RESULT=$RESULT_DIR/exec-tar-result-$FILE_NAME_EXTENSION.journal
+
+mkdir -p $RESULT_DIR
+
+tcc -e -j $JOURNAL_RESULT -p ./
+grw -c 3 -f chtml -o $HTML_RESULT $JOURNAL_RESULT
--- /dev/null
+# TET reserved codes
+0 "PASS"
+1 "FAIL"
+2 "UNRESOLVED"
+3 "NOTINUSE"
+4 "UNSUPPORTED"
+5 "UNTESTED"
+6 "UNINITIATED"
+7 "NORESULT"
+
+# Test suite additional codes
+33 "INSPECT"
--- /dev/null
+all
+ ^TEST
+##### Scenarios for TEST #####
+
+# Test scenario
+TEST
+ :include:/unit/tslist
--- /dev/null
+TET_OUTPUT_CAPTURE=False
+TET_BUILD_TOOL=make
+TET_PASS_TC_NAME=True
+TET_API_COMPLIANT=False
--- /dev/null
+TET_OUTPUT_CAPTURE=False
+TET_CLEAN_TOOL=make clean
--- /dev/null
+TET_OUTPUT_CAPTURE=False
--- /dev/null
+CC ?= gcc
+
+TARGETS = utc_ApplicationFW_appsvc_set_operation_func \
+ utc_ApplicationFW_appsvc_set_uri_func \
+ utc_ApplicationFW_appsvc_set_mime_func \
+ utc_ApplicationFW_appsvc_add_data_func \
+ utc_ApplicationFW_appsvc_add_data_array_func \
+ utc_ApplicationFW_appsvc_set_pkgname_func \
+ utc_ApplicationFW_appsvc_run_service_func \
+ utc_ApplicationFW_appsvc_get_list_func \
+ utc_ApplicationFW_appsvc_get_operation_func \
+ utc_ApplicationFW_appsvc_get_mime_func \
+ utc_ApplicationFW_appsvc_get_uri_func \
+ utc_ApplicationFW_appsvc_get_pkgname_func \
+ utc_ApplicationFW_appsvc_is_defapp_func \
+ utc_ApplicationFW_appsvc_data_is_array_func \
+ utc_ApplicationFW_appsvc_set_defapp_func \
+ utc_ApplicationFW_appsvc_unset_defapp_func \
+ utc_ApplicationFW_appsvc_get_data_func \
+ utc_ApplicationFW_appsvc_get_data_array_func \
+ utc_ApplicationFW_appsvc_create_result_bundle_func \
+ utc_ApplicationFW_appsvc_send_result_func
+
+PKGS = bundle appsvc
+
+LDFLAGS = `pkg-config --libs $(PKGS)`
+LDFLAGS += $(TET_ROOT)/lib/tet3/tcm_s.o
+LDFLAGS += -L$(TET_ROOT)/lib/tet3 -ltcm_s
+LDFLAGS += -L$(TET_ROOT)/lib/tet3 -lapi_s
+
+CFLAGS = -I. `pkg-config --cflags $(PKGS)`
+CFLAGS += -I$(TET_ROOT)/inc/tet3
+CFLAGS += -Wall
+
+all: $(TARGETS)
+
+$(TARGETS): %: %.c
+ $(CC) -o $@ $< $(CFLAGS) $(LDFLAGS)
+
+clean:
+ rm -f $(TARGETS)
--- /dev/null
+#!/bin/sh
+
+TMPSTR=$0
+SCRIPT=${TMPSTR##*/}
+
+if [ $# -lt 2 ]; then
+ echo "Usage) $SCRIPT module_name api_name"
+ exit 1
+fi
+
+MODULE=$1
+API=$2
+TEMPLATE=utc_MODULE_API_func.c.in
+TESTCASE=utc_${MODULE}_${API}_func
+
+sed -e '
+ s^@API@^'"$API"'^g
+ s^@MODULE@^'"$MODULE"'^g
+ ' $TEMPLATE > $TESTCASE.c
+
+if [ ! -e "$TESTCASE.c" ]; then
+ echo "Failed"
+ exit 1
+fi
+echo "Testcase file is $TESTCASE.c"
+echo "Done"
+echo "please put \"$TESTCASE\" as Target in Makefile"
+echo "please put \"/unit/$TESTCASE\" in tslist"
--- /dev/null
+/unit/utc_ApplicationFW_appsvc_set_operation_func
+/unit/utc_ApplicationFW_appsvc_set_uri_func
+/unit/utc_ApplicationFW_appsvc_set_mime_func
+/unit/utc_ApplicationFW_appsvc_add_data_func
+/unit/utc_ApplicationFW_appsvc_add_data_array_func
+/unit/utc_ApplicationFW_appsvc_set_pkgname_func
+/unit/utc_ApplicationFW_appsvc_run_service_func
+/unit/utc_ApplicationFW_appsvc_get_list_func
+/unit/utc_ApplicationFW_appsvc_get_operation_func
+/unit/utc_ApplicationFW_appsvc_get_mime_func
+/unit/utc_ApplicationFW_appsvc_get_uri_func
+/unit/utc_ApplicationFW_appsvc_get_pkgname_func
+/unit/utc_ApplicationFW_appsvc_is_defapp_func
+/unit/utc_ApplicationFW_appsvc_data_is_array_func
+/unit/utc_ApplicationFW_appsvc_set_defapp_func
+/unit/utc_ApplicationFW_appsvc_unset_defapp_func
+/unit/utc_ApplicationFW_appsvc_get_data_func
+/unit/utc_ApplicationFW_appsvc_get_data_array_func
+/unit/utc_ApplicationFW_appsvc_create_result_bundle_func
+/unit/utc_ApplicationFW_appsvc_send_result_func
--- /dev/null
+/*
+ * app-svc
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>, Jaeho Lee <jaeho81.lee@samsung.com>
+ *
+ * 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 <tet_api.h>
+#include <appsvc.h>
+#include <bundle.h>
+#include <unistd.h>
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup) (void) = startup;
+void (*tet_cleanup) (void) = cleanup;
+
+static void utc_appsvc_add_data_array_func_01(void);
+static void utc_appsvc_add_data_array_func_02(void);
+static void utc_appsvc_add_data_array_func_03(void);
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ {utc_appsvc_add_data_array_func_01, POSITIVE_TC_IDX},
+ {utc_appsvc_add_data_array_func_02, NEGATIVE_TC_IDX},
+ {utc_appsvc_add_data_array_func_03, NEGATIVE_TC_IDX},
+ {NULL, 0}
+};
+
+static void startup(void)
+{
+ tet_infoline("Testing API appsvc_add_data_array start");
+}
+
+static void cleanup(void)
+{
+ tet_infoline("Testing API appsvc_add_data_array ends ");
+
+}
+
+/**
+ * @brief Positive test case of appsvc_add_data_array()
+ */
+static void utc_appsvc_add_data_array_func_01(void)
+{
+ int ret = APPSVC_RET_OK;
+ const char *images[] = { "/opt/media/a.jpg",
+ "/opt/media/b.jpg", "/opt/media/c.jpg"
+ };
+ bundle *b = NULL;
+ b = bundle_create();
+ if (b == NULL) {
+ tet_infoline("Test initialization failed!!!");
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+ ret = appsvc_add_data_array(b, APPSVC_DATA_SELECTED, images, 3);
+ if (ret == APPSVC_RET_OK) {
+ tet_infoline("appsvc_add_data_array test PASS!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_PASS);
+ } else {
+ tet_infoline("appsvc_add_data_array test FAIL!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_FAIL);
+ }
+ bundle_free(b);
+ return;
+}
+
+/**
+ * @brief Negative test case of appsvc_add_data_array()
+ */
+static void utc_appsvc_add_data_array_func_02(void)
+{
+ int ret = APPSVC_RET_OK;
+ const char *images[] = { "/opt/media/a.jpg",
+ "/opt/media/b.jpg", "/opt/media/c.jpg"
+ };
+ bundle *b = NULL;
+ b = bundle_create();
+ if (b == NULL) {
+ tet_infoline("Test initialization failed!!!");
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+ ret = appsvc_add_data_array(b, NULL, images, 3);
+ if (ret == APPSVC_RET_EINVAL) {
+ tet_infoline("appsvc_add_data_array test PASS!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_PASS);
+ } else {
+ tet_infoline("appsvc_add_data_array test FAIL!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_FAIL);
+ }
+ bundle_free(b);
+ return;
+}
+
+/**
+ * @brief Negative test case of appsvc_add_data_array()
+ */
+static void utc_appsvc_add_data_array_func_03(void)
+{
+ int ret = APPSVC_RET_OK;
+ bundle *b = NULL;
+ b = bundle_create();
+ if (b == NULL) {
+ tet_infoline("Test initialization failed!!!");
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+ ret = appsvc_add_data_array(b, APPSVC_DATA_SELECTED, NULL, 3);
+ if (ret == APPSVC_RET_EINVAL) {
+ tet_infoline("appsvc_add_data_array test PASS!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_PASS);
+ } else {
+ tet_infoline("appsvc_add_data_array test FAIL!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_FAIL);
+ }
+ bundle_free(b);
+ return;
+}
--- /dev/null
+/*
+ * app-svc
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>, Jaeho Lee <jaeho81.lee@samsung.com>
+ *
+ * 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 <tet_api.h>
+#include <appsvc.h>
+#include <bundle.h>
+#include <unistd.h>
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup) (void) = startup;
+void (*tet_cleanup) (void) = cleanup;
+
+static void utc_appsvc_add_data_func_01(void);
+static void utc_appsvc_add_data_func_02(void);
+static void utc_appsvc_add_data_func_03(void);
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ {utc_appsvc_add_data_func_01, POSITIVE_TC_IDX},
+ {utc_appsvc_add_data_func_02, NEGATIVE_TC_IDX},
+ {utc_appsvc_add_data_func_03, NEGATIVE_TC_IDX},
+ {NULL, 0}
+};
+
+static void startup(void)
+{
+ tet_infoline("Testing API appsvc_add_data start");
+}
+
+static void cleanup(void)
+{
+ tet_infoline("Testing API appsvc_add_data ends ");
+
+}
+
+/**
+ * @brief Positive test case of appsvc_add_data()
+ */
+static void utc_appsvc_add_data_func_01(void)
+{
+ int ret = APPSVC_RET_OK;
+ bundle *b = NULL;
+ b = bundle_create();
+ if (b == NULL) {
+ tet_infoline("Test initialization failed!!!");
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+ ret = appsvc_add_data(b, APPSVC_DATA_CC, "abcd@samsung.com");
+ if (ret == APPSVC_RET_OK) {
+ tet_infoline("appsvc_add_data test PASS!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_PASS);
+ } else {
+ tet_infoline("appsvc_add_data test FAIL!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_FAIL);
+ }
+ bundle_free(b);
+ return;
+}
+
+/**
+ * @brief Negative test case of appsvc_add_data()
+ */
+static void utc_appsvc_add_data_func_02(void)
+{
+ int ret = APPSVC_RET_OK;
+ bundle *b = NULL;
+ b = bundle_create();
+ if (b == NULL) {
+ tet_infoline("Test initialization failed!!!");
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+ ret = appsvc_add_data(b, NULL, "abcd@samsung.com");
+ if (ret == APPSVC_RET_EINVAL) {
+ tet_infoline("appsvc_add_data test PASS!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_PASS);
+ } else {
+ tet_infoline("appsvc_add_data test FAIL!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_FAIL);
+ }
+ bundle_free(b);
+ return;
+}
+
+/**
+ * @brief Negative test case of appsvc_add_data()
+ */
+static void utc_appsvc_add_data_func_03(void)
+{
+ int ret = APPSVC_RET_OK;
+ bundle *b = NULL;
+ b = bundle_create();
+ if (b == NULL) {
+ tet_infoline("Test initialization failed!!!");
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+ ret = appsvc_add_data(b, APPSVC_DATA_CC, NULL);
+ if (ret == APPSVC_RET_EINVAL) {
+ tet_infoline("appsvc_add_data test PASS!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_PASS);
+ } else {
+ tet_infoline("appsvc_add_data test FAIL!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_FAIL);
+ }
+ bundle_free(b);
+ return;
+}
--- /dev/null
+/*
+ * app-svc
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>, Jaeho Lee <jaeho81.lee@samsung.com>
+ *
+ * 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 <tet_api.h>
+#include <appsvc.h>
+#include <bundle.h>
+#include <unistd.h>
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup) (void) = startup;
+void (*tet_cleanup) (void) = cleanup;
+
+static void utc_appsvc_create_result_bundle_func_01(void);
+static void utc_appsvc_create_result_bundle_func_02(void);
+static void utc_appsvc_create_result_bundle_func_03(void);
+static void utc_appsvc_create_result_bundle_func_04(void);
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ {utc_appsvc_create_result_bundle_func_01, POSITIVE_TC_IDX},
+ {utc_appsvc_create_result_bundle_func_02, NEGATIVE_TC_IDX},
+ {utc_appsvc_create_result_bundle_func_03, NEGATIVE_TC_IDX},
+ {utc_appsvc_create_result_bundle_func_04, NEGATIVE_TC_IDX},
+ {NULL, 0}
+};
+
+static void startup(void)
+{
+ tet_infoline("Testing API appsvc_create_result_bundle starts");
+}
+
+static void cleanup(void)
+{
+ tet_infoline("Testing API appsvc_create_result_bundle ends");
+}
+
+/**
+ * @brief Positive test case of appsvc_create_result_bundle()
+ */
+static void utc_appsvc_create_result_bundle_func_01(void)
+{
+ int ret = APPSVC_RET_OK;
+ bundle *inb = NULL;
+ bundle *outb = NULL;
+ inb = bundle_create();
+ if (inb == NULL) {
+ tet_infoline("Test initialization failed!!!");
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+ ret = bundle_add(inb, "__AUL_ORG_CALLER_PID__", "2000");
+ if (ret != 0) {
+ tet_infoline("Test initialization failed!!!");
+ bundle_free(inb);
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+
+ ret = appsvc_create_result_bundle(inb, &outb);
+ if (ret == APPSVC_RET_OK) {
+ tet_infoline("appsvc_create_result_bundle test PASS!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_PASS);
+ } else {
+ tet_infoline("appsvc_create_result_bundle test FAIL!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_FAIL);
+ }
+ bundle_free(inb);
+ if (outb != NULL) {
+ bundle_free(outb);
+ }
+ return;
+}
+
+/**
+ * @brief Negative test case of appsvc_create_result_bundle()
+ */
+static void utc_appsvc_create_result_bundle_func_02(void)
+{
+ int ret = APPSVC_RET_OK;
+ bundle *outb = NULL;
+ ret = appsvc_create_result_bundle(NULL, &outb);
+ if (ret == APPSVC_RET_EINVAL) {
+ tet_infoline("appsvc_create_result_bundle test PASS!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_PASS);
+ } else {
+ tet_infoline("appsvc_create_result_bundle test FAIL!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_FAIL);
+ }
+ if (outb != NULL) {
+ bundle_free(outb);
+ }
+ return;
+}
+
+/**
+ * @brief Negative test case of appsvc_create_result_bundle()
+ */
+static void utc_appsvc_create_result_bundle_func_03(void)
+{
+ int ret = APPSVC_RET_OK;
+ bundle *inb = NULL;
+ bundle *outb = NULL;
+ inb = bundle_create();
+ if (inb == NULL) {
+ tet_infoline("Test initialization failed!!!");
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+ ret = appsvc_create_result_bundle(inb, &outb);
+ if (ret == APPSVC_RET_EINVAL) {
+ tet_infoline("appsvc_create_result_bundle test PASS!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_PASS);
+ } else {
+ tet_infoline("appsvc_create_result_bundle test FAIL!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_FAIL);
+ }
+ bundle_free(inb);
+ if (outb != NULL) {
+ bundle_free(outb);
+ }
+}
+
+/**
+ * @brief Negative test case of appsvc_create_result_bundle()
+ */
+static void utc_appsvc_create_result_bundle_func_04(void)
+{
+ int ret = APPSVC_RET_OK;
+ bundle *inb = NULL;
+ inb = bundle_create();
+ if (inb == NULL) {
+ tet_infoline("Test initialization failed!!!");
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+
+ ret = appsvc_create_result_bundle(inb, NULL);
+ if (ret == APPSVC_RET_EINVAL) {
+ tet_infoline("appsvc_create_result_bundle test PASS!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_PASS);
+ } else {
+ tet_infoline("appsvc_create_result_bundle test FAIL!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_FAIL);
+ }
+ bundle_free(inb);
+}
--- /dev/null
+/*
+ * app-svc
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>, Jaeho Lee <jaeho81.lee@samsung.com>
+ *
+ * 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 <tet_api.h>
+#include <appsvc.h>
+#include <bundle.h>
+#include <unistd.h>
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup) (void) = startup;
+void (*tet_cleanup) (void) = cleanup;
+
+static void utc_appsvc_data_is_array_func_01(void);
+static void utc_appsvc_data_is_array_func_02(void);
+static void utc_appsvc_data_is_array_func_03(void);
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ {utc_appsvc_data_is_array_func_01, POSITIVE_TC_IDX},
+ {utc_appsvc_data_is_array_func_02, NEGATIVE_TC_IDX},
+ {utc_appsvc_data_is_array_func_03, NEGATIVE_TC_IDX},
+ {NULL, 0}
+};
+
+static void startup(void)
+{
+ tet_infoline("Testing API appsvc_set_uri start");
+}
+
+static void cleanup(void)
+{
+ tet_infoline("Testing API appsvc_set_uri ends ");
+
+}
+
+/**
+ * @brief Positive test case of appsvc_data_is_array()
+ */
+static void utc_appsvc_data_is_array_func_01(void)
+{
+ int ret = APPSVC_RET_OK;
+ const char *images[] = { "/opt/media/a.jpg",
+ "/opt/media/b.jpg", "/opt/media/c.jpg"
+ };
+ bundle *b = NULL;
+
+ b = bundle_create();
+ if (b == NULL) {
+ tet_infoline("Test initialization failed!!!");
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+ ret = appsvc_add_data_array(b, APPSVC_DATA_SELECTED, images, 3);
+ if (ret != APPSVC_RET_OK) {
+ tet_infoline("Test initialization failed!!!");
+ bundle_free(b);
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+
+ ret = appsvc_data_is_array(b, APPSVC_DATA_SELECTED);
+ if (ret == 1) {
+ tet_infoline("appsvc_data_is_array test PASS!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_PASS);
+ } else {
+ tet_infoline("appsvc_data_is_array test FAIL!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_FAIL);
+ }
+}
+
+/**
+ * @brief Negative test case of appsvc_data_is_array()
+ */
+static void utc_appsvc_data_is_array_func_02(void)
+{
+ int ret = 0;
+ bundle *b = NULL;
+ b = bundle_create();
+ if (b == NULL) {
+ tet_infoline("Test initialization failed!!!");
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+ ret = appsvc_add_data(b, APPSVC_DATA_CC, "abcd@samsung.com");
+ if (ret != APPSVC_RET_OK) {
+ tet_infoline("Test initialization failed!!!");
+ bundle_free(b);
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+
+ ret = appsvc_data_is_array(b, APPSVC_DATA_CC);
+ if (ret == 0) {
+ tet_infoline("appsvc_data_is_array test PASS!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_PASS);
+ } else {
+ tet_infoline("appsvc_data_is_array test FAIL!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_FAIL);
+ }
+ bundle_free(b);
+ return;
+}
+
+/**
+ * @brief Negative test case of appsvc_data_is_array()
+ */
+static void utc_appsvc_data_is_array_func_03(void)
+{
+ int ret = 0;
+ bundle *b = NULL;
+ b = bundle_create();
+ if (b == NULL) {
+ tet_infoline("Test initialization failed!!!");
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+
+ ret = appsvc_data_is_array(b, APPSVC_DATA_SELECTED);
+ if (ret == 0) {
+ tet_infoline("appsvc_data_is_array test PASS!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_PASS);
+ } else {
+ tet_infoline("appsvc_data_is_array test FAIL!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_FAIL);
+ }
+ bundle_free(b);
+ return;
+}
--- /dev/null
+/*
+ * app-svc
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>, Jaeho Lee <jaeho81.lee@samsung.com>
+ *
+ * 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 <tet_api.h>
+#include <appsvc.h>
+#include <bundle.h>
+#include <unistd.h>
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup) (void) = startup;
+void (*tet_cleanup) (void) = cleanup;
+
+static void utc_appsvc_get_data_array_func_01(void);
+static void utc_appsvc_get_data_array_func_02(void);
+static void utc_appsvc_get_data_array_func_03(void);
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ {utc_appsvc_get_data_array_func_01, POSITIVE_TC_IDX},
+ {utc_appsvc_get_data_array_func_02, NEGATIVE_TC_IDX},
+ {utc_appsvc_get_data_array_func_03, NEGATIVE_TC_IDX},
+ {NULL, 0}
+};
+
+static void startup(void)
+{
+ tet_infoline("Testing API appsvc_set_uri start");
+}
+
+static void cleanup(void)
+{
+ tet_infoline("Testing API appsvc_set_uri ends ");
+
+}
+
+/**
+ * @brief Positive test case of appsvc_get_data_array()
+ */
+static void utc_appsvc_get_data_array_func_01(void)
+{
+ const char **ret_array = NULL;
+ const char *images[] = { "/opt/media/a.jpg",
+ "/opt/media/b.jpg", "/opt/media/c.jpg"
+ };
+ bundle *b = NULL;
+ int len = 0;
+ int ret = APPSVC_RET_OK;
+
+ b = bundle_create();
+ if (b == NULL) {
+ tet_infoline("Test initialization failed!!!");
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+ ret = appsvc_add_data_array(b, APPSVC_DATA_SELECTED, images, 3);
+ if (ret != APPSVC_RET_OK) {
+ tet_infoline("Test initialization failed!!!");
+ bundle_free(b);
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+
+ ret_array = appsvc_get_data_array(b, APPSVC_DATA_SELECTED, &len);
+ if (ret_array != NULL) {
+ tet_infoline("appsvc_get_data_array test PASS!");
+ tet_result(TET_PASS);
+ } else {
+ tet_infoline("appsvc_get_data_array test FAIL!");
+ tet_printf("ret_array = NULL");
+ tet_result(TET_FAIL);
+ }
+
+ bundle_free(b);
+ return;
+}
+
+/**
+ * @brief Negative test case of appsvc_get_data_array()
+ */
+static void utc_appsvc_get_data_array_func_02(void)
+{
+ int ret = APPSVC_RET_OK;
+ const char **ret_array = NULL;
+ const char *images[] = { "/opt/media/a.jpg",
+ "/opt/media/b.jpg", "/opt/media/c.jpg"
+ };
+ bundle *b = NULL;
+ int len = 0;
+ b = bundle_create();
+ if (b == NULL) {
+ tet_infoline("Test initialization failed!!!");
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+ ret = appsvc_add_data_array(b, APPSVC_DATA_SELECTED, images, 3);
+ if (ret != APPSVC_RET_OK) {
+ tet_infoline("Test initialization failed!!!");
+ bundle_free(b);
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+
+ ret_array = appsvc_get_data_array(b, NULL, &len);
+ if (ret_array == NULL) {
+ tet_infoline("appsvc_get_data_array test PASS!");
+ tet_printf("ret_array = NULL");
+ tet_result(TET_PASS);
+ } else {
+ tet_infoline("appsvc_get_data_array test FAIL!");
+ tet_result(TET_FAIL);
+ }
+ bundle_free(b);
+ return;
+}
+
+/**
+ * @brief Negative test case of appsvc_get_data_array()
+ */
+static void utc_appsvc_get_data_array_func_03(void)
+{
+ const char **ret_array = NULL;
+ int len = 0;
+
+ ret_array = appsvc_get_data_array(NULL, NULL, &len);
+ if (ret_array == NULL) {
+ tet_infoline("appsvc_get_data_array test PASS!");
+ tet_printf("ret_array = NULL");
+ tet_result(TET_PASS);
+ } else {
+ tet_infoline("appsvc_get_data_array test FAIL!");
+ tet_result(TET_FAIL);
+ }
+
+ return;
+}
--- /dev/null
+/*
+ * app-svc
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>, Jaeho Lee <jaeho81.lee@samsung.com>
+ *
+ * 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 <tet_api.h>
+#include <appsvc.h>
+#include <bundle.h>
+#include <unistd.h>
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup) (void) = startup;
+void (*tet_cleanup) (void) = cleanup;
+
+static void utc_appsvc_get_data_func_01(void);
+static void utc_appsvc_get_data_func_02(void);
+static void utc_appsvc_get_data_func_03(void);
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ {utc_appsvc_get_data_func_01, POSITIVE_TC_IDX},
+ {utc_appsvc_get_data_func_02, NEGATIVE_TC_IDX},
+ {utc_appsvc_get_data_func_03, NEGATIVE_TC_IDX},
+ {NULL, 0}
+};
+
+static void startup(void)
+{
+ tet_infoline("Testing API appsvc_set_uri start");
+}
+
+static void cleanup(void)
+{
+ tet_infoline("Testing API appsvc_set_uri ends ");
+
+}
+
+/**
+ * @brief Positive test case of appsvc_get_data()
+ */
+static void utc_appsvc_get_data_func_01(void)
+{
+ const char *ret_data = NULL;
+ int ret = APPSVC_RET_OK;
+ bundle *b = NULL;
+ b = bundle_create();
+ if (b == NULL) {
+ tet_infoline("Test initialization failed!!!");
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+ ret = appsvc_add_data(b, APPSVC_DATA_CC, "abcd@samsung.com");
+ if (ret != APPSVC_RET_OK) {
+ tet_infoline("Test initialization failed!!!");
+ bundle_free(b);
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+
+ ret_data = appsvc_get_data(b, APPSVC_DATA_CC);
+ if (ret_data != NULL) {
+ tet_infoline("appsvc_get_data test PASS!");
+ tet_printf("ret = %s", ret_data);
+ tet_result(TET_PASS);
+ } else {
+ tet_infoline("appsvc_get_data test FAIL!");
+ tet_printf("ret = NULL");
+ tet_result(TET_FAIL);
+ }
+ bundle_free(b);
+ return;
+}
+
+/**
+ * @brief Negative test case of appsvc_get_data()
+ */
+static void utc_appsvc_get_data_func_02(void)
+{
+ const char *ret_data = NULL;
+ bundle *b = NULL;
+ b = bundle_create();
+ if (b == NULL) {
+ tet_infoline("Test initialization failed!!!");
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+ ret_data = appsvc_get_data(b, APPSVC_DATA_CC);
+ if (ret_data == NULL) {
+ tet_infoline("appsvc_get_data test PASS!");
+ tet_printf("ret = NULL");
+ tet_result(TET_PASS);
+ } else {
+ tet_infoline("appsvc_get_data test FAIL!");
+ tet_printf("ret = %s", ret_data);
+ tet_result(TET_FAIL);
+ }
+ bundle_free(b);
+ return;
+}
+
+/**
+ * @brief Negative test case of appsvc_get_data()
+ */
+static void utc_appsvc_get_data_func_03(void)
+{
+ const char *ret_data = NULL;
+ bundle *b = NULL;
+ b = bundle_create();
+ if (b == NULL) {
+ tet_infoline("Test initialization failed!!!");
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+ ret_data = appsvc_get_data(NULL, APPSVC_DATA_CC);
+ if (ret_data == NULL) {
+ tet_infoline("appsvc_get_data test PASS!");
+ tet_printf("ret_data = NULL");
+ tet_result(TET_PASS);
+ } else {
+ tet_infoline("appsvc_get_data test FAIL!");
+ tet_printf("ret_data = %s", ret_data);
+ tet_result(TET_FAIL);
+ }
+ bundle_free(b);
+ return;
+}
--- /dev/null
+/*
+ * app-svc
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>, Jaeho Lee <jaeho81.lee@samsung.com>
+ *
+ * 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 <tet_api.h>
+#include <appsvc.h>
+#include <bundle.h>
+#include <unistd.h>
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup) (void) = startup;
+void (*tet_cleanup) (void) = cleanup;
+
+static void utc_appsvc_get_list_func_01(void);
+static void utc_appsvc_get_list_func_02(void);
+static void utc_appsvc_get_list_func_03(void);
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ {utc_appsvc_get_list_func_01, POSITIVE_TC_IDX},
+ {utc_appsvc_get_list_func_02, NEGATIVE_TC_IDX},
+ {utc_appsvc_get_list_func_03, NEGATIVE_TC_IDX},
+ {NULL, 0}
+};
+
+static void startup(void)
+{
+ tet_infoline("Testing API appsvc_get_list starts");
+}
+
+static void cleanup(void)
+{
+ tet_infoline("Testing API appsvc_get_list ends");
+}
+
+static void iter_function(const char *pkg_name, void *data)
+{
+ tet_printf("Pkg name is %s", pkg_name);
+ return;
+}
+
+/**
+ * @brief Positive test case of appsvc_get_list()
+ */
+static void utc_appsvc_get_list_func_01(void)
+{
+ int ret = APPSVC_RET_OK;
+ bundle *b = NULL;
+ b = bundle_create();
+ if (b == NULL) {
+ tet_infoline("Test initialization failed!!!");
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+ ret = appsvc_set_operation(b, APPSVC_OPERATION_PICK);
+ if (ret != APPSVC_RET_OK) {
+ tet_infoline("Test initialization failed!!!");
+ bundle_free(b);
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+ ret = appsvc_get_list(b, (void *)iter_function, NULL);
+ if (ret == APPSVC_RET_OK) {
+ tet_infoline("appsvc_get_list test PASS!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_PASS);
+ } else {
+ tet_infoline("appsvc_get_list test FAIL!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_FAIL);
+ }
+ bundle_free(b);
+ return;
+}
+
+/**
+ * @brief Negative test case of appsvc_get_list()
+ */
+static void utc_appsvc_get_list_func_02(void)
+{
+ int ret = APPSVC_RET_OK;
+ bundle *b = NULL;
+ b = bundle_create();
+ if (b == NULL) {
+ tet_infoline("Test initialization failed!!!");
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+ ret = appsvc_set_operation(b, APPSVC_OPERATION_DEFAULT);
+ if (ret != APPSVC_RET_OK) {
+ tet_infoline("Test initialization failed!!!");
+ bundle_free(b);
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+ ret = appsvc_get_list(b, (void *)iter_function, NULL);
+ if (ret == APPSVC_RET_ENOMATCH) {
+ tet_infoline("appsvc_get_list test PASS!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_PASS);
+ } else {
+ tet_infoline("appsvc_get_list test FAIL!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_FAIL);
+ }
+ bundle_free(b);
+ return;
+}
+
+/**
+ * @brief Negative test case of appsvc_get_list()
+ */
+static void utc_appsvc_get_list_func_03(void)
+{
+ int ret = APPSVC_RET_OK;
+ ret = appsvc_get_list(NULL, NULL, NULL);
+ if (ret == APPSVC_RET_EINVAL) {
+ tet_infoline("appsvc_get_list test PASS!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_PASS);
+ } else {
+ tet_infoline("appsvc_get_list test FAIL!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_FAIL);
+ }
+ return;
+}
--- /dev/null
+/*
+ * app-svc
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>, Jaeho Lee <jaeho81.lee@samsung.com>
+ *
+ * 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 <tet_api.h>
+#include <appsvc.h>
+#include <bundle.h>
+#include <unistd.h>
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup) (void) = startup;
+void (*tet_cleanup) (void) = cleanup;
+
+static void utc_appsvc_get_mime_func_01(void);
+static void utc_appsvc_get_mime_func_02(void);
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ {utc_appsvc_get_mime_func_01, POSITIVE_TC_IDX},
+ {utc_appsvc_get_mime_func_02, NEGATIVE_TC_IDX},
+ {NULL, 0}
+};
+
+static void startup(void)
+{
+ tet_infoline("Testing API appsvc_get_mime starts");
+}
+
+static void cleanup(void)
+{
+ tet_infoline("Testing API appsvc_get_mime ends");
+}
+
+/**
+ * @brief Positive test case of appsvc_get_mime()
+ */
+static void utc_appsvc_get_mime_func_01(void)
+{
+ const char *ret_mime = NULL;
+ int ret = APPSVC_RET_OK;
+ bundle *b = NULL;
+ b = bundle_create();
+ if (b == NULL) {
+ tet_infoline("Test initialization failed!!!");
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+ ret = appsvc_set_mime(b, "image/jpg");
+ if (ret != APPSVC_RET_OK) {
+ tet_infoline("Test initialization failed!!!");
+ bundle_free(b);
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+
+ ret_mime = appsvc_get_mime(b);
+ if (ret_mime != NULL) {
+ tet_infoline("appsvc_get_mime test PASS!");
+ tet_printf("ret = %s", ret_mime);
+ tet_result(TET_PASS);
+ } else {
+ tet_infoline("appsvc_get_mime test FAIL!");
+ tet_printf("ret_mime = NULL");
+ tet_result(TET_FAIL);
+ }
+ bundle_free(b);
+ return;
+}
+
+/**
+ * @brief Negative test case of appsvc_get_mime()
+ */
+static void utc_appsvc_get_mime_func_02(void)
+{
+ const char *ret_mime = NULL;
+ bundle *b = NULL;
+ b = bundle_create();
+ if (b == NULL) {
+ tet_infoline("Test initialization failed!!!");
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+ ret_mime = appsvc_get_mime(b);
+ if (ret_mime == NULL) {
+ tet_infoline("appsvc_get_mime test PASS!");
+ tet_printf("ret_mime = NULL");
+ tet_result(TET_PASS);
+ } else {
+ tet_infoline("appsvc_get_mime test FAIL!");
+ tet_printf("ret = %s", ret_mime);
+ tet_result(TET_FAIL);
+ }
+ bundle_free(b);
+}
--- /dev/null
+/*
+ * app-svc
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>, Jaeho Lee <jaeho81.lee@samsung.com>
+ *
+ * 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 <tet_api.h>
+#include <appsvc.h>
+#include <bundle.h>
+#include <unistd.h>
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup) (void) = startup;
+void (*tet_cleanup) (void) = cleanup;
+
+static void utc_appsvc_get_operation_func_01(void);
+static void utc_appsvc_get_operation_func_02(void);
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ {utc_appsvc_get_operation_func_01, POSITIVE_TC_IDX},
+ {utc_appsvc_get_operation_func_02, NEGATIVE_TC_IDX},
+ {NULL, 0}
+};
+
+static void startup(void)
+{
+ tet_infoline("Testing API appsvc_get_operation starts");
+}
+
+static void cleanup(void)
+{
+ tet_infoline("Testing API appsvc_get_operation ends");
+}
+
+/**
+ * @brief Positive test case of appsvc_get_operation()
+ */
+static void utc_appsvc_get_operation_func_01(void)
+{
+ const char *ret_operation = NULL;
+ int ret = APPSVC_RET_OK;
+ bundle *b = NULL;
+ b = bundle_create();
+ if (b == NULL) {
+ tet_infoline("Test initialization failed!!!");
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+ ret = appsvc_set_operation(b, APPSVC_OPERATION_VIEW);
+ if (ret != APPSVC_RET_OK) {
+ tet_infoline("Test initialization failed!!!");
+ bundle_free(b);
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+ ret_operation = appsvc_get_operation(b);
+ if (ret_operation != NULL) { /*TODO: check content */
+ tet_infoline("appsvc_get_operation test PASS!");
+ tet_printf("ret = %s", ret_operation);
+ tet_result(TET_PASS);
+ } else {
+ tet_infoline("appsvc_get_operation test FAIL!");
+ tet_printf("ret is NULL");
+ tet_result(TET_FAIL);
+ }
+ bundle_free(b);
+ return;
+}
+
+/**
+ * @brief Negative test case of appsvc_get_operation()
+ */
+static void utc_appsvc_get_operation_func_02(void)
+{
+ const char *ret_operation = NULL;
+ bundle *b = NULL;
+ b = bundle_create();
+ if (b == NULL) {
+ tet_infoline("Test initialization failed!!!");
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+
+ ret_operation = appsvc_get_operation(b);
+ if (ret_operation == NULL) {
+ tet_infoline("appsvc_get_operation test PASS!");
+ tet_printf("ret is NULL");
+ tet_result(TET_PASS);
+ } else {
+ tet_infoline("appsvc_get_operation test FAIL!");
+ tet_printf("ret = %s", ret_operation);
+ tet_result(TET_FAIL);
+ }
+ bundle_free(b);
+ return;
+}
--- /dev/null
+/*
+ * app-svc
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>, Jaeho Lee <jaeho81.lee@samsung.com>
+ *
+ * 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 <tet_api.h>
+#include <appsvc.h>
+#include <bundle.h>
+#include <unistd.h>
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup) (void) = startup;
+void (*tet_cleanup) (void) = cleanup;
+
+static void utc_appsvc_get_pkgname_func_01(void);
+static void utc_appsvc_get_pkgname_func_02(void);
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ {utc_appsvc_get_pkgname_func_01, POSITIVE_TC_IDX},
+ {utc_appsvc_get_pkgname_func_02, NEGATIVE_TC_IDX},
+ {NULL, 0}
+};
+
+static void startup(void)
+{
+ tet_infoline("Testing API appsvc_get_pkgname starts");
+}
+
+static void cleanup(void)
+{
+ tet_infoline("Testing API appsvc_get_pkgname ends");
+}
+
+/**
+ * @brief Positive test case of appsvc_get_pkgname()
+ */
+static void utc_appsvc_get_pkgname_func_01(void)
+{
+ const char *ret_pkgname = NULL;
+ int ret = APPSVC_RET_OK;
+ bundle *b = NULL;
+ b = bundle_create();
+ if (b == NULL) {
+ tet_infoline("Test initialization failed!!!");
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+ ret = appsvc_set_pkgname(b, "org.tizen.gallery");
+ if (ret != APPSVC_RET_OK) {
+ tet_infoline("Test initialization failed!!!");
+ bundle_free(b);
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+ ret_pkgname = appsvc_get_pkgname(b);
+ if (ret_pkgname != NULL) {
+ tet_infoline("appsvc_get_pkgname test PASS!");
+ tet_printf("ret = %s", ret_pkgname);
+ tet_result(TET_PASS);
+ } else {
+ tet_infoline("appsvc_get_pkgname test FAIL!");
+ tet_printf("ret = NULL");
+ tet_result(TET_FAIL);
+ }
+ bundle_free(b);
+ return;
+}
+
+/**
+ * @brief Negative test case of appsvc_get_pkgname()
+ */
+static void utc_appsvc_get_pkgname_func_02(void)
+{
+ const char *ret_pkgname = NULL;
+ bundle *b = NULL;
+ b = bundle_create();
+ if (b == NULL) {
+ tet_infoline("Test initialization failed!!!");
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+ ret_pkgname = appsvc_get_pkgname(b);
+ if (ret_pkgname == NULL) {
+ tet_infoline("appsvc_get_pkgname test PASS!");
+ tet_printf("ret_pkgname = NULL");
+ tet_result(TET_PASS);
+ } else {
+ tet_infoline("appsvc_get_pkgname test FAIL!");
+ tet_printf("ret_pkgname = %s", ret_pkgname);
+ tet_result(TET_FAIL);
+ }
+ bundle_free(b);
+ return;
+}
--- /dev/null
+/*
+ * app-svc
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>, Jaeho Lee <jaeho81.lee@samsung.com>
+ *
+ * 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 <tet_api.h>
+#include <appsvc.h>
+#include <bundle.h>
+#include <unistd.h>
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup) (void) = startup;
+void (*tet_cleanup) (void) = cleanup;
+
+static void utc_appsvc_get_uri_func_01(void);
+static void utc_appsvc_get_uri_func_02(void);
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ {utc_appsvc_get_uri_func_01, POSITIVE_TC_IDX},
+ {utc_appsvc_get_uri_func_02, NEGATIVE_TC_IDX},
+ {NULL, 0}
+};
+
+static void startup(void)
+{
+ tet_infoline("Testing API appsvc_get_uri start");
+}
+
+static void cleanup(void)
+{
+ tet_infoline("Testing API appsvc_get_uri ends ");
+
+}
+
+/**
+ * @brief Positive test case of appsvc_get_uri()
+ */
+static void utc_appsvc_get_uri_func_01(void)
+{
+ const char *ret_uri = NULL;
+ int ret = APPSVC_RET_OK;
+ bundle *b = NULL;
+ b = bundle_create();
+ if (b == NULL) {
+ tet_infoline("Test initialization failed!!!");
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+ ret = appsvc_set_uri(b, "http://www.samsung.com");
+ if (ret != APPSVC_RET_OK) {
+ tet_infoline("Test initialization failed!!!");
+ bundle_free(b);
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+
+ ret_uri = appsvc_get_uri(b);
+ if (ret_uri != NULL) {
+ tet_infoline("appsvc_get_uri test PASS!");
+ tet_printf("ret_uri = %s", ret_uri);
+ tet_result(TET_PASS);
+ } else {
+ tet_infoline("appsvc_get_uri test FAIL!");
+ tet_printf("ret_uri = NULL");
+ tet_result(TET_FAIL);
+ }
+ bundle_free(b);
+ return;
+}
+
+/**
+ * @brief Negative test case of appsvc_get_uri()
+ */
+static void utc_appsvc_get_uri_func_02(void)
+{
+ const char *ret_uri = NULL;
+ bundle *b = NULL;
+ b = bundle_create();
+ if (b == NULL) {
+ tet_infoline("Test initialization failed!!!");
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+ ret_uri = appsvc_get_uri(b);
+ if (ret_uri == NULL) {
+ tet_infoline("appsvc_get_uri test PASS!");
+ tet_printf("ret = NULL");
+ tet_result(TET_PASS);
+ } else {
+ tet_infoline("appsvc_get_uri test FAIL!");
+ tet_printf("ret_uri = %s", ret_uri);
+ tet_result(TET_FAIL);
+ }
+ bundle_free(b);
+ return;
+}
--- /dev/null
+/*
+ * app-svc
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>, Jaeho Lee <jaeho81.lee@samsung.com>
+ *
+ * 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 <tet_api.h>
+#include <appsvc.h>
+#include <bundle.h>
+#include <unistd.h>
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup) (void) = startup;
+void (*tet_cleanup) (void) = cleanup;
+
+static void utc_appsvc_is_defapp_func_01(void);
+static void utc_appsvc_is_defapp_func_02(void);
+static void utc_appsvc_is_defapp_func_03(void);
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ {utc_appsvc_is_defapp_func_01, POSITIVE_TC_IDX},
+ {utc_appsvc_is_defapp_func_02, NEGATIVE_TC_IDX},
+ {utc_appsvc_is_defapp_func_03, NEGATIVE_TC_IDX},
+ {NULL, 0}
+};
+
+static void startup(void)
+{
+ tet_infoline("Testing API appsvc_set_is_defapp starts");
+}
+
+static void cleanup(void)
+{
+ tet_infoline("Testing API appsvc_set_is_defapp ends");
+}
+
+/**
+ * @brief Positive test case of appsvc_is_defapp()
+ */
+static void utc_appsvc_is_defapp_func_01(void)
+{
+ int ret = 0;
+ ret =
+ appsvc_set_defapp("slp.appsvc.operation.abcd123", NULL, NULL,
+ "org.tizen.abcd123");
+ if (ret != APPSVC_RET_OK) {
+ tet_infoline("Test initialization failed!!!");
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+ ret = appsvc_is_defapp("org.tizen.abcd123");
+ if (ret == 1) {
+ tet_infoline("appsvc_is_defapp test PASS!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_PASS);
+ } else {
+ tet_infoline("appsvc_is_defapp test FAIL!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_FAIL);
+ }
+ appsvc_unset_defapp("org.tizen.abcd123");
+}
+
+/**
+ * @brief Negative test case of appsvc_is_defapp()
+ */
+static void utc_appsvc_is_defapp_func_02(void)
+{
+ int ret = 0;
+ ret = appsvc_is_defapp("org.tizen.abcdefgh");
+ if (ret == 0) {
+ tet_infoline("appsvc_is_defapp test PASS!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_PASS);
+ } else {
+ tet_infoline("appsvc_is_defapp test FAIL!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_FAIL);
+ }
+}
+
+/**
+ * @brief Negative test case of appsvc_is_defapp()
+ */
+static void utc_appsvc_is_defapp_func_03(void)
+{
+ int ret = 0;
+ ret = appsvc_is_defapp(NULL);
+ if (ret == 0) {
+ tet_infoline("appsvc_is_defapp test PASS!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_PASS);
+ } else {
+ tet_infoline("appsvc_is_defapp test FAIL!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_FAIL);
+ }
+}
--- /dev/null
+/*
+ * app-svc
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>, Jaeho Lee <jaeho81.lee@samsung.com>
+ *
+ * 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 <tet_api.h>
+#include <appsvc.h>
+#include <bundle.h>
+#include <unistd.h>
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup) (void) = startup;
+void (*tet_cleanup) (void) = cleanup;
+
+static void utc_appsvc_run_service_func_01(void);
+static void utc_appsvc_run_service_func_02(void);
+static void utc_appsvc_run_service_func_03(void);
+static void utc_appsvc_run_service_func_04(void);
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ {utc_appsvc_run_service_func_01, POSITIVE_TC_IDX},
+ {utc_appsvc_run_service_func_02, NEGATIVE_TC_IDX},
+ {utc_appsvc_run_service_func_03, NEGATIVE_TC_IDX},
+ {utc_appsvc_run_service_func_04, NEGATIVE_TC_IDX},
+ {NULL, 0}
+};
+
+static void startup(void)
+{
+ tet_infoline("Testing API appsvc_run_service starts");
+}
+
+static void cleanup(void)
+{
+ tet_infoline("Testing API appsvc_run_service ends");
+}
+
+/**
+ * @brief Positive test case of appsvc_run_service()
+ */
+static void utc_appsvc_run_service_func_01(void)
+{
+ int ret = APPSVC_RET_OK;
+ bundle *b = NULL;
+ b = bundle_create();
+ if (b == NULL) {
+ tet_infoline("Test initialization failed!!!");
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+ ret = appsvc_set_operation(b, APPSVC_OPERATION_PICK);
+ if (ret != APPSVC_RET_OK) {
+ tet_infoline("Test initialization failed!!!");
+ bundle_free(b);
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+ ret = appsvc_set_mime(b, "image/jpg");
+ if (ret != APPSVC_RET_OK) {
+ tet_infoline("Test initialization failed!!!");
+ bundle_free(b);
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+ ret = appsvc_run_service(b, 0, NULL, (void *)NULL);
+ if (ret > APPSVC_RET_OK) { /*Return value is pid of the application */
+ tet_infoline("appsvc_run_service test PASS!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_PASS);
+ } else {
+ tet_infoline("appsvc_run_service test FAIL!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_FAIL);
+ }
+ bundle_free(b);
+ return;
+}
+
+/**
+ * @brief Negative test case of appsvc_run_service()
+ */
+static void utc_appsvc_run_service_func_02(void)
+{
+ int ret = APPSVC_RET_OK;
+ ret = appsvc_run_service(NULL, 0, NULL, (void *)NULL);
+ if (ret == APPSVC_RET_EINVAL) {
+ tet_infoline("1appsvc_run_service test PASS!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_PASS);
+ } else {
+ tet_infoline("1appsvc_run_service test FAIL!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_FAIL);
+ }
+ return;
+}
+
+/**
+ * @brief Negative test case of appsvc_run_service()
+ */
+static void utc_appsvc_run_service_func_03(void)
+{
+ int ret = APPSVC_RET_OK;
+ bundle *b = NULL;
+ b = bundle_create();
+ if (b == NULL) {
+ tet_infoline("Test initialization failed!!!");
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+ ret = appsvc_set_mime(b, "abcdefgh");
+ if (ret != APPSVC_RET_OK) {
+ tet_infoline("Test initialization failed!!!");
+ bundle_free(b);
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+ ret = appsvc_run_service(b, 0, NULL, (void *)NULL);
+ if (ret == APPSVC_RET_ENOMATCH) {
+ tet_infoline("appsvc_run_service test PASS!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_PASS);
+ } else {
+ tet_infoline("appsvc_run_service test FAIL!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_FAIL);
+ }
+ bundle_free(b);
+ return;
+}
+
+/**
+ * @brief Negative test case of appsvc_run_service()
+ */
+static void utc_appsvc_run_service_func_04(void)
+{
+ int ret = APPSVC_RET_OK;
+ bundle *b = NULL;
+ b = bundle_create();
+ if (b == NULL) {
+ tet_infoline("Test initialization failed!!!");
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+ ret = appsvc_set_pkgname(b, "\0");
+ if (ret != APPSVC_RET_OK) {
+ tet_infoline("Test initialization failed!!!");
+ bundle_free(b);
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+ ret = appsvc_run_service(b, 0, NULL, (void *)NULL);
+ if (ret == APPSVC_RET_ELAUNCH) {
+ tet_infoline("appsvc_run_service test PASS!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_PASS);
+ } else {
+ tet_infoline("appsvc_run_service test FAIL!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_FAIL);
+ }
+ bundle_free(b);
+ return;
+}
--- /dev/null
+/*
+ * app-svc
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>, Jaeho Lee <jaeho81.lee@samsung.com>
+ *
+ * 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 <tet_api.h>
+#include <appsvc.h>
+#include <bundle.h>
+#include <unistd.h>
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup) (void) = startup;
+void (*tet_cleanup) (void) = cleanup;
+
+static void utc_appsvc_send_result_func_01(void);
+static void utc_appsvc_send_result_func_02(void);
+static void utc_appsvc_send_result_func_03(void);
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ {utc_appsvc_send_result_func_01, POSITIVE_TC_IDX},
+ {utc_appsvc_send_result_func_02, POSITIVE_TC_IDX},
+ {utc_appsvc_send_result_func_03, NEGATIVE_TC_IDX},
+ {NULL, 0}
+};
+
+static void startup(void)
+{
+ tet_infoline("Testing API appsvc_send_result starts");
+}
+
+static void cleanup(void)
+{
+ tet_infoline("Testing API appsvc_send_result ends");
+}
+
+/**
+ * @brief Positive test case of appsvc_send_result()
+ */
+static void utc_appsvc_send_result_func_01(void)
+{
+ int ret = APPSVC_RET_OK;
+ bundle *inb = NULL;
+ bundle *outb = NULL;
+ inb = bundle_create();
+ if (inb == NULL) {
+ tet_infoline("Test initialization failed!!!");
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+ ret = bundle_add(inb, "__AUL_ORG_CALLER_PID__", "1234");
+ if (ret != 0) {
+ tet_infoline("Test initialization failed!!!");
+ bundle_free(inb);
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+ ret = appsvc_create_result_bundle(inb, &outb);
+ if (ret != APPSVC_RET_OK) {
+ tet_infoline("Test initialization failed!!!");
+ bundle_free(inb);
+ if (outb) {
+ bundle_free(outb);
+ }
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+ ret = bundle_add(outb, "result", "1");
+ if (ret != 0) {
+ tet_infoline("Test initialization failed!!!");
+ bundle_free(inb);
+ bundle_free(outb);
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+
+ ret = appsvc_send_result(outb, 0);
+
+ if (ret == APPSVC_RET_OK) {
+ tet_infoline("appsvc_send_result test PASS!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_PASS);
+ } else {
+ tet_infoline("appsvc_send_result test FAIL!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_FAIL);
+ }
+ bundle_free(inb);
+ bundle_free(outb);
+}
+
+/**
+ * @brief Positive test case of appsvc_send_result()
+ */
+static void utc_appsvc_send_result_func_02(void)
+{
+ int ret = APPSVC_RET_OK;
+ bundle *inb = NULL;
+ bundle *outb = NULL;
+ inb = bundle_create();
+ if (inb == NULL) {
+ tet_infoline("Test initialization failed!!!");
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+ ret = bundle_add(inb, "__AUL_ORG_CALLER_PID__", "1234");
+ if (ret != 0) {
+ tet_infoline("Test initialization failed!!!");
+ bundle_free(inb);
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+
+ ret = appsvc_create_result_bundle(inb, &outb);
+ if (ret != APPSVC_RET_OK) {
+ tet_infoline("Test initialization failed!!!");
+ bundle_free(inb);
+ if (outb) {
+ bundle_free(outb);
+ }
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+
+ ret = bundle_add(outb, "result", "1");
+ if (ret != 0) {
+ tet_infoline("Test initialization failed!!!");
+ bundle_free(inb);
+ bundle_free(outb);
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+
+ ret = appsvc_send_result(outb, -1);
+ if (ret == APPSVC_RET_OK) {
+ tet_infoline("appsvc_send_result test PASS!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_PASS);
+ } else {
+ tet_infoline("appsvc_send_result test FAIL!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_FAIL);
+ }
+ bundle_free(inb);
+ bundle_free(outb);
+}
+
+/**
+ * @brief Negative test case of appsvc_send_result()
+ */
+static void utc_appsvc_send_result_func_03(void)
+{
+ int ret = APPSVC_RET_OK;
+ bundle *inb = NULL;
+ bundle *outb = NULL;
+ inb = bundle_create();
+ if (inb == NULL) {
+ tet_infoline("Test initialization failed!!!");
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+ ret = bundle_add(inb, "__AUL_ORG_CALLER_PID__", "1234");
+ if (ret != 0) {
+ tet_infoline("Test initialization failed!!!");
+ bundle_free(inb);
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+ ret = appsvc_create_result_bundle(inb, &outb);
+ if (ret != APPSVC_RET_OK) {
+ tet_infoline("Test initialization failed!!!");
+ bundle_free(inb);
+ if (outb) {
+ bundle_free(outb);
+ }
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+ ret = bundle_add(outb, "result", "1");
+ if (ret != 0) {
+ tet_infoline("Test initialization failed!!!");
+ bundle_free(inb);
+ bundle_free(outb);
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+
+ ret = appsvc_send_result(outb, -2);
+ if (ret == APPSVC_RET_EINVAL) {
+ tet_infoline("appsvc_send_result test PASS!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_PASS);
+ } else {
+ tet_infoline("appsvc_send_result test FAIL!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_FAIL);
+ }
+ bundle_free(inb);
+ bundle_free(outb);
+}
--- /dev/null
+/*
+ * app-svc
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>, Jaeho Lee <jaeho81.lee@samsung.com>
+ *
+ * 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 <tet_api.h>
+#include <appsvc.h>
+#include <bundle.h>
+#include <unistd.h>
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup) (void) = startup;
+void (*tet_cleanup) (void) = cleanup;
+
+static void utc_appsvc_set_defapp_func_01(void);
+static void utc_appsvc_set_defapp_func_02(void);
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ {utc_appsvc_set_defapp_func_01, POSITIVE_TC_IDX},
+ {utc_appsvc_set_defapp_func_02, NEGATIVE_TC_IDX},
+ {NULL, 0}
+};
+
+static void startup(void)
+{
+ tet_infoline("Testing API appsvc_set_defapp starts");
+ appsvc_unset_defapp("org.tizen.abcd");
+}
+
+static void cleanup(void)
+{
+ tet_infoline("Testing API appsvc_set_defapp ends");
+ appsvc_unset_defapp("org.tizen.abcd12");
+}
+
+/**
+ * @brief Positive test case of appsvc_set_defapp()
+ */
+static void utc_appsvc_set_defapp_func_01(void)
+{
+ int ret = APPSVC_RET_OK;
+ ret =
+ appsvc_set_defapp("slp.appsvc.operation.abcd12", NULL, NULL,
+ "org.tizen.abcd12");
+ if (ret == APPSVC_RET_OK) {
+ tet_infoline("appsvc_set_defapp test PASS!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_PASS);
+ } else {
+ tet_infoline("appsvc_set_defapp test FAIL!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_FAIL);
+ }
+}
+
+/**
+ * @brief Negative test case of appsvc_set_defapp()
+ */
+static void utc_appsvc_set_defapp_func_02(void)
+{
+ int ret = APPSVC_RET_OK;
+ ret = appsvc_set_defapp("slp.appsvc.operation.abcd", NULL, NULL, NULL);
+ if (ret == APPSVC_RET_EINVAL) {
+ tet_infoline("appsvc_set_defapp test PASS!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_PASS);
+ } else {
+ tet_infoline("appsvc_set_defapp test FAIL!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_FAIL);
+ }
+}
--- /dev/null
+/*
+ * app-svc
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>, Jaeho Lee <jaeho81.lee@samsung.com>
+ *
+ * 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 <tet_api.h>
+#include <appsvc.h>
+#include <bundle.h>
+#include <unistd.h>
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup) (void) = startup;
+void (*tet_cleanup) (void) = cleanup;
+
+static void utc_appsvc_set_mime_func_01(void);
+static void utc_appsvc_set_mime_func_02(void);
+static void utc_appsvc_set_mime_func_03(void);
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ {utc_appsvc_set_mime_func_01, POSITIVE_TC_IDX},
+ {utc_appsvc_set_mime_func_02, NEGATIVE_TC_IDX},
+ {utc_appsvc_set_mime_func_03, NEGATIVE_TC_IDX},
+ {NULL, 0}
+};
+
+static void startup(void)
+{
+ tet_infoline("Testing API appsvc_set_mime starts");
+ return;
+}
+
+static void cleanup(void)
+{
+ tet_infoline("Testing API appsvc_set_mime ends");
+ return;
+}
+
+/**
+ * @brief Positive test case of appsvc_set_mime()
+ */
+static void utc_appsvc_set_mime_func_01(void)
+{
+ int ret = APPSVC_RET_OK;
+ bundle *b = NULL;
+ b = bundle_create();
+ if (b == NULL) {
+ tet_infoline("Test initialization failed!!!");
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+ ret = appsvc_set_mime(b, "image/jpg");
+ if (ret == APPSVC_RET_OK) {
+ tet_infoline("appsvc_set_mime test PASS!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_PASS);
+ } else {
+ tet_infoline("appsvc_set_mime test FAIL!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_FAIL);
+ }
+ bundle_free(b);
+ return;
+}
+
+/**
+ * @brief Negative test case of appsvc_set_mime()
+ */
+static void utc_appsvc_set_mime_func_02(void)
+{
+ int ret = APPSVC_RET_OK;
+ bundle *b = NULL;
+ b = bundle_create();
+ if (b == NULL) {
+ tet_infoline("Test initialization failed!!!");
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+ ret = appsvc_set_mime(b, NULL);
+ if (ret == APPSVC_RET_EINVAL) {
+ tet_infoline("appsvc_set_mime test PASS!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_PASS);
+ } else {
+ tet_infoline("appsvc_set_mime test FAIL!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_FAIL);
+ }
+ bundle_free(b);
+ return;
+}
+
+/**
+ * @brief Negative test case of appsvc_set_mime()
+ */
+static void utc_appsvc_set_mime_func_03(void)
+{
+ int ret = APPSVC_RET_OK;
+ ret = appsvc_set_mime(NULL, "image/jpg");
+ if (ret == APPSVC_RET_EINVAL) {
+ tet_infoline("appsvc_set_mime test PASS!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_PASS);
+ } else {
+ tet_infoline("appsvc_set_mime test FAIL!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_FAIL);
+ }
+ return;
+}
--- /dev/null
+/*
+ * app-svc
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>, Jaeho Lee <jaeho81.lee@samsung.com>
+ *
+ * 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 <tet_api.h>
+#include <appsvc.h>
+#include <bundle.h>
+#include <unistd.h>
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup) (void) = startup;
+void (*tet_cleanup) (void) = cleanup;
+
+static void utc_appsvc_set_operation_func_01(void);
+static void utc_appsvc_set_operation_func_02(void);
+static void utc_appsvc_set_operation_func_03(void);
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ {utc_appsvc_set_operation_func_01, POSITIVE_TC_IDX},
+ {utc_appsvc_set_operation_func_02, NEGATIVE_TC_IDX},
+ {utc_appsvc_set_operation_func_03, NEGATIVE_TC_IDX},
+ {NULL, 0}
+};
+
+static void startup(void)
+{
+ tet_infoline("Testing API appsvc_set_operation starts");
+}
+
+static void cleanup(void)
+{
+ tet_infoline("Testing API appsvc_set_operation ends");
+}
+
+/**
+ * @brief Positive test case of appsvc_set_operation()
+ */
+static void utc_appsvc_set_operation_func_01(void)
+{
+ int ret = APPSVC_RET_OK;
+ bundle *b = NULL;
+ b = bundle_create();
+ if (b == NULL) {
+ tet_infoline("Test initialization failed!!!");
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+ ret = appsvc_set_operation(b, APPSVC_OPERATION_VIEW);
+ if (ret == APPSVC_RET_OK) {
+ tet_infoline("appsvc_set_operation test PASS!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_PASS);
+ } else {
+ tet_infoline("appsvc_set_operation test FAIL!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_FAIL);
+ }
+ bundle_free(b);
+ return;
+}
+
+/**
+ * @brief Negative test case of appsvc_set_operation()
+ */
+static void utc_appsvc_set_operation_func_02(void)
+{
+ int ret = APPSVC_RET_OK;
+ bundle *b = NULL;
+ b = bundle_create();
+ if (b == NULL) {
+ tet_infoline("Test initialization failed!!!");
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+ ret = appsvc_set_operation(b, NULL);
+ if (ret == APPSVC_RET_EINVAL) {
+ tet_infoline("appsvc_set_operation test PASS!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_PASS);
+ } else {
+ tet_infoline("appsvc_set_operation test FAIL!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_FAIL);
+ }
+ bundle_free(b);
+ return;
+}
+
+/**
+ * @brief Negative test case of appsvc_set_operation()
+ */
+static void utc_appsvc_set_operation_func_03(void)
+{
+ int ret = APPSVC_RET_OK;
+ ret = appsvc_set_operation(NULL, APPSVC_OPERATION_VIEW);
+ if (ret == APPSVC_RET_EINVAL) {
+ tet_infoline("appsvc_set_operation test PASS!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_PASS);
+ } else {
+ tet_infoline("appsvc_set_operation test FAIL!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_FAIL);
+ }
+ return;
+}
--- /dev/null
+/*
+ * app-svc
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>, Jaeho Lee <jaeho81.lee@samsung.com>
+ *
+ * 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 <tet_api.h>
+#include <appsvc.h>
+#include <bundle.h>
+#include <unistd.h>
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup) (void) = startup;
+void (*tet_cleanup) (void) = cleanup;
+
+static void utc_appsvc_set_pkgname_func_01(void);
+static void utc_appsvc_set_pkgname_func_02(void);
+static void utc_appsvc_set_pkgname_func_03(void);
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ {utc_appsvc_set_pkgname_func_01, POSITIVE_TC_IDX},
+ {utc_appsvc_set_pkgname_func_02, NEGATIVE_TC_IDX},
+ {utc_appsvc_set_pkgname_func_03, NEGATIVE_TC_IDX},
+ {NULL, 0}
+};
+
+static void startup(void)
+{
+ tet_infoline("Testing API appsvc_set_pkgname starts");
+}
+
+static void cleanup(void)
+{
+ tet_infoline("Testing API appsvc_set_pkgname ends");
+}
+
+/**
+ * @brief Positive test case of appsvc_set_pkgname()
+ */
+static void utc_appsvc_set_pkgname_func_01(void)
+{
+ int ret = APPSVC_RET_OK;
+ bundle *b = NULL;
+ b = bundle_create();
+ if (b == NULL) {
+ tet_infoline("Test initialization failed!!!");
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+ ret = appsvc_set_pkgname(b, "org.tizen.test");
+ if (ret == APPSVC_RET_OK) {
+ tet_infoline("appsvc_set_pkgname test PASS!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_PASS);
+ } else {
+ tet_infoline("appsvc_set_pkgname test FAIL!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_FAIL);
+ }
+ bundle_free(b);
+ return;
+}
+
+/**
+ * @brief Negative test case of appsvc_set_pkgname()
+ */
+static void utc_appsvc_set_pkgname_func_02(void)
+{
+ int ret = APPSVC_RET_OK;
+ bundle *b = NULL;
+ b = bundle_create();
+ if (b == NULL) {
+ tet_infoline("Test initialization failed!!!");
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+ ret = appsvc_set_pkgname(b, NULL);
+ if (ret == APPSVC_RET_EINVAL) {
+ tet_infoline("appsvc_set_pkgname test PASS!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_PASS);
+ } else {
+ tet_infoline("appsvc_set_pkgname test FAIL!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_FAIL);
+ }
+ bundle_free(b);
+ return;
+}
+
+/**
+ * @brief Negative test case of appsvc_set_pkgname()
+ */
+static void utc_appsvc_set_pkgname_func_03(void)
+{
+ int ret = APPSVC_RET_OK;
+ ret = appsvc_set_pkgname(NULL, "org.tizen.test");
+ if (ret == APPSVC_RET_EINVAL) {
+ tet_infoline("appsvc_set_pkgname test PASS!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_PASS);
+ } else {
+ tet_infoline("appsvc_set_pkgname test FAIL!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_FAIL);
+ }
+ return;
+}
--- /dev/null
+/*
+ * app-svc
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>, Jaeho Lee <jaeho81.lee@samsung.com>
+ *
+ * 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 <tet_api.h>
+#include <appsvc.h>
+#include <bundle.h>
+#include <unistd.h>
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup) (void) = startup;
+void (*tet_cleanup) (void) = cleanup;
+
+static void utc_appsvc_set_uri_func_01(void);
+static void utc_appsvc_set_uri_func_02(void);
+static void utc_appsvc_set_uri_func_03(void);
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ {utc_appsvc_set_uri_func_01, POSITIVE_TC_IDX},
+ {utc_appsvc_set_uri_func_02, NEGATIVE_TC_IDX},
+ {utc_appsvc_set_uri_func_03, NEGATIVE_TC_IDX},
+ {NULL, 0}
+};
+
+static void startup(void)
+{
+ tet_infoline("Testing API appsvc_set_uri start");
+}
+
+static void cleanup(void)
+{
+ tet_infoline("Testing API appsvc_set_uri ends ");
+
+}
+
+/**
+ * @brief Positive test case of appsvc_set_uri()
+ */
+static void utc_appsvc_set_uri_func_01(void)
+{
+ int ret = APPSVC_RET_OK;
+ bundle *b = NULL;
+ b = bundle_create();
+ if (b == NULL) {
+ tet_infoline("Test initialization failed!!!");
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+ ret = appsvc_set_uri(b, "http://www.samsung.com");
+ if (ret == APPSVC_RET_OK) {
+ tet_infoline("appsvc_set_uri test PASS!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_PASS);
+ } else {
+ tet_infoline("appsvc_set_uri test FAIL!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_FAIL);
+ }
+ bundle_free(b);
+ return;
+}
+
+/**
+ * @brief Negative test case of appsvc_set_uri()
+ */
+static void utc_appsvc_set_uri_func_02(void)
+{
+ int ret = APPSVC_RET_OK;
+ bundle *b = NULL;
+ b = bundle_create();
+ if (b == NULL) {
+ tet_infoline("Test initialization failed!!!");
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+ ret = appsvc_set_uri(b, NULL);
+ if (ret == APPSVC_RET_EINVAL) {
+ tet_infoline("appsvc_set_uri test PASS!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_PASS);
+ } else {
+ tet_infoline("appsvc_set_uri test FAIL!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_FAIL);
+ }
+ bundle_free(b);
+ return;
+}
+
+/**
+ * @brief Negative test case of appsvc_set_uri()
+ */
+static void utc_appsvc_set_uri_func_03(void)
+{
+ int ret = APPSVC_RET_OK;
+ ret = appsvc_set_uri(NULL, "http://www.samsung.com");
+ if (ret == APPSVC_RET_EINVAL) {
+ tet_infoline("appsvc_set_uri test PASS!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_PASS);
+ } else {
+ tet_infoline("appsvc_set_uri test FAIL!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_FAIL);
+ }
+ return;
+}
--- /dev/null
+/*
+ * app-svc
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>, Jaeho Lee <jaeho81.lee@samsung.com>
+ *
+ * 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 <tet_api.h>
+#include <appsvc.h>
+#include <bundle.h>
+#include <unistd.h>
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup) (void) = startup;
+void (*tet_cleanup) (void) = cleanup;
+
+static void utc_appsvc_unset_defapp_func_01(void);
+static void utc_appsvc_unset_defapp_func_02(void);
+
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ {utc_appsvc_unset_defapp_func_01, POSITIVE_TC_IDX},
+ {utc_appsvc_unset_defapp_func_02, NEGATIVE_TC_IDX},
+ {NULL, 0}
+};
+
+static void startup(void)
+{
+ tet_infoline("Testing API appsvc_unset_defapp starts");
+ appsvc_unset_defapp("org.tizen.xyz");
+}
+
+static void cleanup(void)
+{
+ tet_infoline("Testing API appsvc_unset_defapp ends");
+ appsvc_unset_defapp("org.tizen.xyz");
+}
+
+/**
+ * @brief Positive test case of appsvc_unset_defapp()
+ */
+static void utc_appsvc_unset_defapp_func_01(void)
+{
+ int ret = APPSVC_RET_OK;
+ ret =
+ appsvc_set_defapp("slp.appsvc.operation.xyz", NULL, NULL,
+ "org.tizen.xyz");
+ if (ret != APPSVC_RET_OK) {
+ tet_result(TET_UNINITIATED);
+ return;
+ }
+
+ ret = appsvc_unset_defapp("org.tizen.xyz");
+ if (ret == APPSVC_RET_OK) {
+ tet_infoline("appsvc_unset_defapp test PASS!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_PASS);
+ } else {
+ tet_infoline("appsvc_unset_defapp test FAIL!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_FAIL);
+ }
+}
+
+/**
+ * @brief Negative test case of appsvc_unset_defapp()
+ */
+static void utc_appsvc_unset_defapp_func_02(void)
+{
+ int ret = APPSVC_RET_OK;
+ ret = appsvc_unset_defapp(NULL);
+ if (ret < 0) {
+ tet_infoline("appsvc_unset_defapp test PASS!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_PASS);
+ } else {
+ tet_infoline("appsvc_unset_defapp test FAIL!");
+ tet_printf("ret = %d", ret);
+ tet_result(TET_FAIL);
+ }
+}
--- /dev/null
+#include <tet_api.h>
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_@MODULE@_@API@_func_01(void);
+static void utc_@MODULE@_@API@_func_02(void);
+
+enum {
+ POSITIVE_TC_IDX = 0x01,
+ NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+ { utc_@MODULE@_@API@_func_01, POSITIVE_TC_IDX },
+ { utc_@MODULE@_@API@_func_02, NEGATIVE_TC_IDX },
+ { NULL, 0 }
+};
+
+static void startup(void)
+{
+}
+
+static void cleanup(void)
+{
+}
+
+/**
+ * @brief Positive test case of @API@()
+ */
+static void utc_@MODULE@_@API@_func_01(void)
+{
+ int r = 0;
+
+/*
+ r = @API@(...);
+*/
+ if (r) {
+ tet_infoline("@API@() failed in positive test case");
+ tet_result(TET_FAIL);
+ return;
+ }
+ tet_result(TET_PASS);
+}
+
+/**
+ * @brief Negative test case of ug_init @API@()
+ */
+static void utc_@MODULE@_@API@_func_02(void)
+{
+ int r = 0;
+
+/*
+ r = @API@(...);
+*/
+ if (r) {
+ tet_infoline("@API@() failed in negative test case");
+ tet_result(TET_FAIL);
+ return;
+ }
+ tet_result(TET_PASS);
+}
+app-svc (0.1.18-3) unstable; urgency=low
+
+ * Updated Code
+ * Git: pkgs/a/app-svc
+ * Tag: app-svc_0.1.18-3
+
+ -- Sewook Park <sewook7.park@samsung.com> Sat, 25 Feb 2012 17:35:51 +0900
+
app-svc (0.1.18-2) unstable; urgency=low
* Initial release
/*
-Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
-PROPRIETARY/CONFIDENTIAL
-This software is the confidential and proprietary information of
-SAMSUNG ELECTRONICS ("Confidential Information"). You agree and acknowledge that
-this software is owned by Samsung and you
-shall not disclose such Confidential Information and shall
-use it only in accordance with the terms of the license agreement
-you entered into with SAMSUNG ELECTRONICS. SAMSUNG make no
-representations or warranties about the suitability
-of the software, either express or implied, including but not
-limited to the implied warranties of merchantability, fitness for
-a particular purpose, or non-infringement.
-SAMSUNG shall not be liable for any damages suffered by licensee arising out of or
-related to this software.
-*/
+ * app-svc
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>, Jaeho Lee <jaeho81.lee@samsung.com>
+ *
+ * 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 <poll.h>
#include <stdio.h>