3 * Copyright (c) 2000-2012 Samsung Electronics Co., Ltd. All Rights Reserved.
\r
5 * This file is part of msg-service.
\r
7 * Contact: Jaeyun Jeong <jyjeong@samsung.com>
\r
8 * Sangkoo Kim <sangkoo.kim@samsung.com>
\r
9 * Seunghwan Lee <sh.cat.lee@samsung.com>
\r
10 * SoonMin Jung <sm0415.jung@samsung.com>
\r
11 * Jae-Young Lee <jy4710.lee@samsung.com>
\r
12 * KeeBum Kim <keebum.kim@samsung.com>
\r
14 * PROPRIETARY/CONFIDENTIAL
\r
16 * This software is the confidential and proprietary information of
\r
17 * SAMSUNG ELECTRONICS ("Confidential Information"). You shall not
\r
18 * disclose such Confidential Information and shall use it only in
\r
19 * accordance with the terms of the license agreement you entered
\r
20 * into with SAMSUNG ELECTRONICS.
\r
22 * SAMSUNG make no representations or warranties about the suitability
\r
23 * of the software, either express or implied, including but not limited
\r
24 * to the implied warranties of merchantability, fitness for a particular
\r
25 * purpose, or non-infringement. SAMSUNG shall not be liable for any
\r
26 * damages suffered by licensee as a result of using, modifying or
\r
27 * distributing this software or its derivatives.
\r
31 #include "utc_msg_count_msg_by_contact.h"
\r
33 static MSG_HANDLE_T msgHandle = NULL;
\r
34 msg_message_t msgInfo;
\r
35 MSG_SENDINGOPT_S sendOpt;
\r
39 MSG_ERROR_T err = MSG_SUCCESS;
\r
41 err = msg_open_msg_handle(&msgHandle);
\r
42 if (err != MSG_SUCCESS)
\r
44 tet_result(TET_FAIL);
\r
48 msgInfo = msg_new_message();
\r
50 memset(&sendOpt, 0x00, sizeof(sendOpt));
\r
52 sendOpt.bSetting = false;
\r
54 msg_add_message(msgHandle, msgInfo, &sendOpt);
\r
56 msg_set_message_id(msgInfo, 0);
\r
60 msg_close_msg_handle(&msgHandle);
\r
63 void utc_msg_count_msg_by_contact_001()
\r
65 MSG_ERROR_T err = MSG_SUCCESS;
\r
66 MSG_THREAD_LIST_INDEX_S addr_info;
\r
67 MSG_THREAD_COUNT_INFO_S msg_thread_count_list;
\r
69 memset(&addr_info, 0x00, sizeof(addr_info));
\r
70 memset(&msg_thread_count_list, 0x00, sizeof(msg_thread_count_list));
\r
72 err = msg_count_msg_by_contact(msgHandle, &addr_info, &msg_thread_count_list);
\r
73 if (err != MSG_SUCCESS)
\r
75 tet_result(TET_FAIL);
\r
79 tet_result(TET_PASS);
\r
82 void utc_msg_count_msg_by_contact_002()
\r
84 MSG_ERROR_T err = MSG_SUCCESS;
\r
85 MSG_THREAD_LIST_INDEX_S addr_info;
\r
86 MSG_THREAD_COUNT_INFO_S msg_thread_count_list;
\r
88 memset(&addr_info, 0x00, sizeof(addr_info));
\r
89 memset(&msg_thread_count_list, 0x00, sizeof(msg_thread_count_list));
\r
91 err = msg_count_msg_by_contact(NULL, &addr_info, &msg_thread_count_list);
\r
92 if (err != MSG_SUCCESS)
\r
94 tet_result(TET_PASS);
\r
98 tet_result(TET_FAIL);
\r