OBEXSessionPut

Function OBEXSessionPut 

Source
pub unsafe extern "C-unwind" fn OBEXSessionPut(
    in_session_ref: OBEXSessionRef,
    in_is_final_chunk: bool,
    in_headers_data: *mut c_void,
    in_headers_data_length: usize,
    in_body_data: *mut c_void,
    in_body_data_length: usize,
    in_callback: OBEXSessionEventCallback,
    in_user_ref_con: *mut c_void,
) -> OBEXError
👎Deprecated
Available on crate feature OBEX only.
Expand description

Send a put command to a remote OBEX server.

Parameter inSessionRef: A valid session reference.

Parameter inIsFinalChunk: TRUE or FALSE - is this the last chunk of header data for this PUT.

Parameter inHeadersData: Headers containing data to PUT. Don’t include your body header data here.

Parameter inHeadersDataLength: Size of header data. Don’t include your body header data here.

Parameter inBodyData: Data for the BODY header to PUT. DO NOT package your data in an actual BODY header, this will be done for you, based on the finalChunk flag you pass in above (since based on this flag the header ID will be either a BODY or ENDOFBODY header).

Parameter inBodyDataLength: Size of Data for the BODY header to PUT.

Parameter inCallback: A valid callback. Will be called for progress, errors and completion.

Parameter inUserRefCon: Optional parameter; can contain anything you wish. Will be returned in your callback just as you passed it.

Returns: An error code value. 0 if successful.

As all commands for OBEX sessions, this command is asynchronous only. A NULL callback paramter will result in an error.

** 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.
  • in_headers_data must be a valid pointer.
  • in_body_data must be a valid pointer.
  • in_callback must be implemented correctly.
  • in_user_ref_con must be a valid pointer.