Functions
Functions
BLE Services » Apple Media Service Client (AMS_C)

## Functions
sdk_err_t | ams_c_client_init (ams_c_evt_handler_t evt_handler)
| Register AMS Client event handler. More...
sdk_err_t | ams_c_disc_srvc_start (uint8_t conn_idx)
| Discover Apple Media Service on peer. More...
sdk_err_t | ams_c_cmd_notify_set (uint8_t conn_idx, bool is_enable)
| Enable or disable peer new command list notify. More...
sdk_err_t | ams_c_attr_update_notify_set (uint8_t conn_idx, bool is_enable)
| Enable or disable peer updated attribute notify. More...
sdk_err_t | ams_c_cplt_attr_read (uint8_t conn_idx)
| Read complete value of updated attrbute . More...
sdk_err_t | ams_c_cmd_send (uint8_t conn_idx, uint8_t cmd_id)
| Send command to peer device. More...
sdk_err_t | ams_c_attr_focus_set (uint8_t conn_idx, const ams_c_ett_attr_id_t *p_ett_attr_id)
| Set concerned attribute. More...
sdk_err_t | ams_c_attr_display_set (uint8_t conn_idx, const ams_c_attr_info_t *p_attr_info)
| Set the attribute that needs to be completely displayed. More...
bool | ams_c_cmd_enable_check (ams_c_cmd_id_t cmd_id)
| Check if the command is available. More...

## Detailed Description

## Function Documentation

## ◆ ams_c_attr_display_set()

sdk_err_t ams_c_attr_display_set | ( | uint8_t | conn_idx,
|  | const ams_c_attr_info_t * | p_attr_info
| ) |  |

Set the attribute that needs to be completely displayed.

Parameters

  [in] | conn_idx | Index of connection.
  [in] | p_attr_info | Point to the structure containing concerned attribute

Returns
  Operation result.

## ◆ ams_c_attr_focus_set()

sdk_err_t ams_c_attr_focus_set | ( | uint8_t | conn_idx,
|  | const ams_c_ett_attr_id_t * | p_ett_attr_id
| ) |  |

Set concerned attribute.

Parameters

  [in] | conn_idx | Index of connection.
  [in] | p_ett_attr_id | Point to the structure containing concerned attribute

Returns
  Operation result.

## ◆ ams_c_attr_update_notify_set()

sdk_err_t ams_c_attr_update_notify_set | ( | uint8_t | conn_idx,
|  | bool | is_enable
| ) |  |

Enable or disable peer updated attribute notify.

Parameters

  [in] | conn_idx | Index of connection.
  [in] | is_enable | True for turn on, false for turn off.

Returns
  Operation result.

## ◆ ams_c_client_init()

sdk_err_t ams_c_client_init | ( | ams_c_evt_handler_t | evt_handler | ) |

Register AMS Client event handler.

Parameters

  [in] | evt_handler | Apple Media Service Client event handler.

Returns
  Result of initialization.

## ◆ ams_c_cmd_enable_check()

bool ams_c_cmd_enable_check | ( | ams_c_cmd_id_t | cmd_id | ) |

Check if the command is available.

Parameters

  [in] | cmd_id | Index of command.

Returns
  Operation result.

## ◆ ams_c_cmd_notify_set()

sdk_err_t ams_c_cmd_notify_set | ( | uint8_t | conn_idx,
|  | bool | is_enable
| ) |  |

Enable or disable peer new command list notify.

Parameters

  [in] | conn_idx | Index of connection.
  [in] | is_enable | True for turn on, false for turn off.

Returns
  Operation result.

## ◆ ams_c_cmd_send()

sdk_err_t ams_c_cmd_send | ( | uint8_t | conn_idx,
|  | uint8_t | cmd_id
| ) |  |

Send command to peer device.

Parameters

  [in] | conn_idx | Index of connection.
  [in] | cmd_id | Index of command.

Returns
  Operation result.

## ◆ ams_c_cplt_attr_read()

sdk_err_t ams_c_cplt_attr_read | ( | uint8_t | conn_idx | ) |

Read complete value of updated attrbute .

Parameters

  [in] | conn_idx | Index of connection.

Returns
  Operation result.

## ◆ ams_c_disc_srvc_start()

sdk_err_t ams_c_disc_srvc_start | ( | uint8_t | conn_idx | ) |

Discover Apple Media Service on peer.

Parameters

  [in] | conn_idx | Index of connection.

Returns
  Operation result.