1 /******************************************************************
3 * Copyright 2014 Samsung Electronics All Rights Reserved.
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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.
19 ******************************************************************/
22 * @file cabtendpoint.h
23 * @brief This file provides the APIs to send data on established RFCOMM connections.
26 #ifndef __CA_EDR_ENDPOINT_H_
27 #define __CA_EDR_ENDPOINT_H_
29 #include <bluetooth.h>
39 * @brief Send data over RFCOMM connection.
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.
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
51 CAResult_t CAEDRSendData(const int32_t serverFD, const void *data, const uint32_t dataLength,
52 uint32_t *sentDataLength);
58 #endif //__CA_EDR_ENDPOINT_H_