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_sms_send_message.h"
\r
33 static MSG_HANDLE_T msgHandle = NULL;
\r
34 msg_message_t msgInfo;
\r
35 MSG_SENDINGOPT_S sendOpt;
\r
37 void sentStatusCB(MSG_HANDLE_T Handle, MSG_SENT_STATUS_S *pStatus, void *pUserParam)
\r
44 MSG_ERROR_T err = MSG_SUCCESS;
\r
45 MSG_SORT_RULE_S sort_rule;
\r
47 err = msg_open_msg_handle(&msgHandle);
\r
48 if (err != MSG_SUCCESS)
\r
50 tet_result(TET_FAIL);
\r
54 msg_reg_sent_status_callback(msgHandle, &sentStatusCB, (void*)"sent status callback");
\r
56 msgInfo = msg_new_message();
\r
58 msg_set_message_type(msgInfo, MSG_TYPE_SMS);
\r
60 msg_sms_set_message_body(msgInfo, "1234567890", 10);
\r
62 msg_add_address(msgInfo, "01000000000", MSG_RECIPIENTS_TYPE_TO);
\r
64 memset(&sendOpt, 0x00, sizeof(sendOpt));
\r
66 sendOpt.bSetting = false;
\r
70 msg_close_msg_handle(&msgHandle);
\r
73 void utc_msg_sms_send_message_001()
\r
75 int err = MSG_SUCCESS;
\r
78 memset(&req, 0x00, sizeof(req));
\r
81 req.sendOpt = sendOpt;
\r
83 err = msg_sms_send_message(msgHandle, &req);
\r
84 if (err != MSG_SUCCESS)
\r
86 tet_result(TET_FAIL);
\r
90 tet_result(TET_PASS);
\r
93 void utc_msg_sms_send_message_002()
\r
95 int err = MSG_SUCCESS;
\r
98 memset(&req, 0x00, sizeof(req));
\r
101 req.sendOpt = sendOpt;
\r
103 err = msg_sms_send_message(NULL, &req);
\r
104 if (err != MSG_SUCCESS)
\r
106 tet_result(TET_PASS);
\r
110 tet_result(TET_FAIL);
\r