apply FSL(Flora Software License)
[framework/messaging/msg-service.git] / TC / msgTC / MapiTransport / utc_msg_reg_sent_status_callback.c
1  /*
2   * Copyright 2012  Samsung Electronics Co., Ltd
3   *
4   * Licensed under the Flora License, Version 1.0 (the "License");
5   * you may not use this file except in compliance with the License.
6   * You may obtain a copy of the License at
7   *
8   *    http://www.tizenopensource.org/license
9   *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16
17 #include "utc_msg_reg_sent_status_callback.h"
18
19 static MSG_HANDLE_T msgHandle = NULL;
20
21 void sentStatusCB(MSG_HANDLE_T Handle, MSG_SENT_STATUS_S *pStatus, void *pUserParam)
22 {
23         return;
24 }
25
26 void startup(void)
27 {
28         MSG_ERROR_T err = MSG_SUCCESS;
29         MSG_SORT_RULE_S sort_rule;
30
31         err = msg_open_msg_handle(&msgHandle);
32         if (err != MSG_SUCCESS)
33         {
34                 tet_result(TET_FAIL);
35                 return;
36         }
37 }
38 void cleanup(void)
39 {
40         msg_close_msg_handle(&msgHandle);
41 }
42
43 void utc_msg_reg_sent_status_callback_001()
44 {
45         int err = MSG_SUCCESS;
46
47         err = msg_reg_sent_status_callback(msgHandle, &sentStatusCB, (void*)"sent status callback");
48         if (err != MSG_SUCCESS)
49         {
50                 tet_result(TET_FAIL);
51                 return;
52         }
53
54         tet_result(TET_PASS);
55 }
56
57 void utc_msg_reg_sent_status_callback_002()
58 {
59         int err = MSG_SUCCESS;
60
61         err = msg_reg_sent_status_callback(NULL, &sentStatusCB, (void*)"sent status callback");
62         if (err != MSG_SUCCESS)
63         {
64                 tet_result(TET_PASS);
65                 return;
66         }
67
68         tet_result(TET_FAIL);
69 }