OBEXSessionGetAvailableCommandPayloadLength

Function OBEXSessionGetAvailableCommandPayloadLength 

Source
pub unsafe extern "C-unwind" fn OBEXSessionGetAvailableCommandPayloadLength(
    in_session_ref: OBEXSessionRef,
    in_op_code: OBEXOpCode,
    out_length: *mut OBEXMaxPacketLength,
) -> OBEXError
๐Ÿ‘ŽDeprecated
Available on crate feature OBEX only.
Expand description

Gets space available for your data for a particular command you are trying to send.

Parameter inSessionRef: A valid session reference.

Parameter inOpCode: An opcode of what command you are trying to send.

Parameter outLength: Space available for your header data in the payload area for a particular command.

Returns: An error code value. 0 if successful.

The OBEXSession takes care of packaging OBEX opcodes and other information into the proper packet format, allowing you to focus on sending the proper OBEX headers in your commands and command responses. This formatting and datas requires a small bit of information that varies depending on what command or response you are sending. Thus, you should call this function to find out how much space will be left for your headers before you send the command, allowing you to properly chop up your headers before sending them. This will guarantee that (a) you use up all the available space in a packet and (b) that you do not get an error trying to send too much information at once.

** DEPRECATED IN BLUETOOTH 2.2 (Mac OS X 10.6) ** You should transition your code to Objective-C equivalents. ** This API may be removed any time in the future.

ยงSafety

  • in_session_ref must be a valid pointer.
  • out_length must be a valid pointer.