3 * Copyright (c) 2000-2012 Samsung Electronics Co., Ltd. All Rights Reserved.
5 * This file is part of msg-service.
7 * Contact: Jaeyun Jeong <jyjeong@samsung.com>
8 * Sangkoo Kim <sangkoo.kim@samsung.com>
9 * Seunghwan Lee <sh.cat.lee@samsung.com>
10 * SoonMin Jung <sm0415.jung@samsung.com>
11 * Jae-Young Lee <jy4710.lee@samsung.com>
12 * KeeBum Kim <keebum.kim@samsung.com>
14 * PROPRIETARY/CONFIDENTIAL
16 * This software is the confidential and proprietary information of
17 * SAMSUNG ELECTRONICS ("Confidential Information"). You shall not
18 * disclose such Confidential Information and shall use it only in
19 * accordance with the terms of the license agreement you entered
20 * into with SAMSUNG ELECTRONICS.
22 * SAMSUNG make no representations or warranties about the suitability
23 * of the software, either express or implied, including but not limited
24 * to the implied warranties of merchantability, fitness for a particular
25 * purpose, or non-infringement. SAMSUNG shall not be liable for any
26 * damages suffered by licensee as a result of using, modifying or
27 * distributing this software or its derivatives.
31 #include "utc_msg_mms_get_smil_region.h"
33 static MSG_HANDLE_T msgHandle = NULL;
34 msg_message_t msgInfo;
35 MMS_MESSAGE_DATA_S* mms_data;
39 MSG_ERROR_T err = MSG_SUCCESS;
41 MMS_MEDIA_S* media[5];
43 err = msg_open_msg_handle(&msgHandle);
44 if (err != MSG_SUCCESS)
50 msgInfo = msg_new_message();
51 mms_data = msg_mms_create_message();
53 msg_mms_set_rootlayout(mms_data, 100, 100, 0xffffff);
54 msg_mms_add_region(mms_data, "Image", 0, 50, 100, 50, 0xffffff);
55 msg_mms_add_region(mms_data, "Text", 0, 0, 100, 50, 0xffffff);
57 //------------> 1st Slide Composing
58 page[0] = msg_mms_add_page(mms_data, 5440);
60 media[0] = msg_mms_add_media(page[0], MMS_SMIL_MEDIA_IMG, "Image", (char*)"/opt/etc/msg-service/P091120_104633.jpg");
61 media[1] = msg_mms_add_media(page[0], MMS_SMIL_MEDIA_AUDIO, NULL, (char*)"/opt/etc/msg-service/audio.amr");
62 media[2] = msg_mms_add_media(page[0], MMS_SMIL_MEDIA_TEXT, "Text", (char*)"/opt/etc/msg-service/Temp0_2.txt");
63 media[2]->sMedia.sText.nColor = 0x000000;
64 media[2]->sMedia.sText.nSize = MMS_SMIL_FONT_SIZE_NORMAL;
65 media[2]->sMedia.sText.bBold = true;
67 //------------> 2nd Slide Composing
68 page[1] = msg_mms_add_page(mms_data, 4544);
70 media[3] = msg_mms_add_media(page[1], MMS_SMIL_MEDIA_TEXT, "Text", (char*)"/opt/etc/msg-service/Temp1_0.txt");
71 media[3]->sMedia.sText.nColor = 0x000000;
72 media[3]->sMedia.sText.nSize = MMS_SMIL_FONT_SIZE_NORMAL;
73 media[3]->sMedia.sText.bItalic = true;
74 media[4] = msg_mms_add_media(page[1], MMS_SMIL_MEDIA_VIDEO, "Text", (char*)"/opt/etc/msg-service/V091120_104905.3gp");
75 strncpy(media[4]->szAlt, "Video Load Fail", MAX_SMIL_ALT_LEN-1);
79 msg_mms_destroy_message(mms_data);
80 msg_close_msg_handle(&msgHandle);
83 void utc_msg_mms_get_smil_region_001()
85 MSG_ERROR_T err = MSG_SUCCESS;
87 MMS_SMIL_REGION* pRegion = msg_mms_get_smil_region(mms_data, 0);
97 void utc_msg_mms_get_smil_region_002()
99 MSG_ERROR_T err = MSG_SUCCESS;
101 MMS_SMIL_REGION* pRegion = msg_mms_get_smil_region(mms_data, -1);
104 tet_result(TET_PASS);
108 tet_result(TET_FAIL);