Added connectivity files for full code review
[platform/upstream/iotivity.git] / resource / csdk / connectivity / src / bt_edr_adapter / tizen / caedrendpoint.h
1 /******************************************************************
2  *
3  * Copyright 2014 Samsung Electronics All Rights Reserved.
4  *
5  *
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  ******************************************************************/
20
21 /**
22  * @file   cabtendpoint.h
23  * @brief  This file provides the APIs to send data on established RFCOMM connections.
24  */
25
26 #ifndef __CA_EDR_ENDPOINT_H_
27 #define __CA_EDR_ENDPOINT_H_
28
29 #include <bluetooth.h>
30
31 #include "cacommon.h"
32
33 #ifdef __cplusplus
34 extern "C"
35 {
36 #endif
37
38 /**
39  * @brief  Send data over RFCOMM connection.
40  *
41  * @param  serverFD         [IN] The RFCOMM connection socket file descriptor.
42  * @param  data             [IN] The data needs to be sent.
43  * @param  dataLength       [IN] The length of data.
44  * @param  sentDataLength   [IN] The length of data which actually sent successful.
45  *
46  * @return #CA_STATUS_OK or Appropriate error code
47  * @retval #CA_STATUS_OK  Successful
48  * @retval #CA_STATUS_INVALID_PARAM  Invalid input argumets
49  * @retval #CA_STATUS_FAILED Operation failed
50  */
51 CAResult_t CAEDRSendData(int serverFD, const void *data, uint32_t dataLength,
52                         uint32_t *sentDataLength);
53
54 #ifdef __cplusplus
55 } /* extern "C" */
56 #endif
57
58 #endif //__CA_EDR_ENDPOINT_H_
59
60