update tizen source
[framework/messaging/msg-service.git] / TC / msgTC / MapiSetting / utc_msg_get_config.c
1 /*\r
2 *\r
3 * Copyright (c) 2000-2012 Samsung Electronics Co., Ltd. All Rights Reserved.\r
4 *\r
5 * This file is part of msg-service.\r
6 *\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
13 *\r
14 * PROPRIETARY/CONFIDENTIAL\r
15 *\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
21 *\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
28 *\r
29 */
30
31 #include "utc_msg_get_config.h"\r
32 \r
33 static MSG_HANDLE_T msgHandle = NULL;\r
34 MSG_SETTING_S setting;\r
35 \r
36 void startup(void)\r
37 {\r
38         MSG_ERROR_T err = MSG_SUCCESS;\r
39         err = msg_open_msg_handle(&msgHandle);\r
40         if (err != MSG_SUCCESS)\r
41         {\r
42                 tet_result(TET_FAIL);\r
43                 return;\r
44         }\r
45 \r
46         memset(&setting, 0x00, sizeof(MSG_OPTION_TYPE_T)+sizeof(MSG_GENERAL_OPT_S));\r
47 \r
48         setting.type = MSG_GENERAL_OPT;\r
49 }\r
50 void cleanup(void)\r
51 {\r
52         msg_close_msg_handle(&msgHandle);\r
53 }\r
54 \r
55 void utc_msg_get_config_001()\r
56 {\r
57         MSG_ERROR_T err = MSG_SUCCESS;\r
58 \r
59         err = msg_get_config(msgHandle, &setting);\r
60         if (err != MSG_SUCCESS)\r
61         {\r
62                 tet_result(TET_FAIL);\r
63                 return;\r
64         }\r
65 \r
66         tet_result(TET_PASS);\r
67 }\r
68 \r
69 void utc_msg_get_config_002()\r
70 {\r
71         MSG_ERROR_T err = MSG_SUCCESS;\r
72 \r
73         err = msg_get_config(NULL, &setting);\r
74         if (err != MSG_SUCCESS)\r
75         {\r
76                 tet_result(TET_PASS);\r
77                 return;\r
78         }\r
79 \r
80         tet_result(TET_FAIL);\r
81 }