1 /* 2 * Copyright (c) 2021 Chipsea Technologies (Shenzhen) Corp., Ltd. All rights reserved. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 #ifndef CSADPAVRCP 16 #define CSADPAVRCP 17 /*chipsea_ohos proguard begin*/ 18 #include "cs_proguard.h" 19 /*chipsea_ohos proguard end*/ 20 #include "bt_types_def.h" 21 22 //#define AVRCP_TRACK_CHANGED 23 24 25 typedef U8 bt_avrcp_adp_state; 26 #define AVRCP_ADP_STATE_IDLE 0 27 #define AVRCP_ADP_STATE_PENDING 1 28 #define AVRCP_ADP_STATE_CONNECTED 2 29 #define AVRCP_ADP_STATE_PLAY 3 30 #define AVRCP_ADP_STATE_PAUSE 5 31 #define AVRCP_ADP_STATE_STOP 6 32 33 typedef U16 bt_avrcpPanelOp; 34 35 #define APP_AVRCP_PANEL_SELECT 0x0000 36 #define APP_AVRCP_PANEL_UP 0x0001 37 #define APP_AVRCP_PANEL_DOWN 0x0002 38 #define APP_AVRCP_PANEL_LEFT 0x0003 39 #define APP_AVRCP_PANEL_RIGHT 0x0004 40 #define APP_AVRCP_PANEL_RIGHT_UP 0x0005 41 #define APP_AVRCP_PANEL_RIGHT_DOWN 0x0006 42 #define APP_AVRCP_PANEL_LEFT_UP 0x0007 43 #define APP_AVRCP_PANEL_LEFT_DOWN 0x0008 44 #define APP_AVRCP_PANEL_ROOT_MENU 0x0009 45 #define APP_AVRCP_PANEL_SETUP_MENU 0x000A 46 #define APP_AVRCP_PANEL_CONTENTS_MENU 0x000B 47 #define APP_AVRCP_PANEL_FAVORITE_MENU 0x000C 48 #define APP_AVRCP_PANEL_EXIT 0x000D 49 50 #define APP_AVRCP_PANEL_0 0x0020 51 #define APP_AVRCP_PANEL_1 0x0021 52 #define APP_AVRCP_PANEL_2 0x0022 53 #define APP_AVRCP_PANEL_3 0x0023 54 #define APP_AVRCP_PANEL_4 0x0024 55 #define APP_AVRCP_PANEL_5 0x0025 56 #define APP_AVRCP_PANEL_6 0x0026 57 #define APP_AVRCP_PANEL_7 0x0027 58 #define APP_AVRCP_PANEL_8 0x0028 59 #define APP_AVRCP_PANEL_9 0x0029 60 #define APP_AVRCP_PANEL_DOT 0x002A 61 #define APP_AVRCP_PANEL_ENTER 0x002B 62 #define APP_AVRCP_PANEL_CLEAR 0x002C 63 64 #define APP_AVRCP_PANEL_CHANNEL_UP 0x0030 65 #define APP_AVRCP_PANEL_CHANNEL_DOWN 0x0031 66 #define APP_AVRCP_PANEL_PREVIOUS_CHANNEL 0x0032 67 #define APP_AVRCP_PANEL_SOUND_SELECT 0x0033 68 #define APP_AVRCP_PANEL_INPUT_SELECT 0x0034 69 #define APP_AVRCP_PANEL_DISPLAY_INFO 0x0035 70 #define APP_AVRCP_PANEL_HELP 0x0036 71 #define APP_AVRCP_PANEL_PAGE_UP 0x0037 72 #define APP_AVRCP_PANEL_PAGE_DOWN 0x0038 73 74 #define APP_AVRCP_PANEL_POWER 0x0040 75 #define APP_AVRCP_PANEL_VOLUME_UP 0x0041 76 #define APP_AVRCP_PANEL_VOLUME_DOWN 0x0042 77 #define APP_AVRCP_PANEL_MUTE 0x0043 78 #define APP_AVRCP_PANEL_PLAY 0x0044 79 #define APP_AVRCP_PANEL_STOP 0x0045 80 #define APP_AVRCP_PANEL_PAUSE 0x0046 81 #define APP_AVRCP_PANEL_RECORD 0x0047 82 #define APP_AVRCP_PANEL_REWIND 0x0048 83 #define APP_AVRCP_PANEL_FAST_FORWARD 0x0049 84 #define APP_AVRCP_PANEL_EJECT 0x004A 85 #define APP_AVRCP_PANEL_FORWARD 0x004B 86 #define APP_AVRCP_PANEL_BACKWARD 0x004C 87 88 #define APP_AVRCP_PANEL_ANGLE 0x0050 89 #define APP_AVRCP_PANEL_SUBPICTURE 0x0051 90 91 #define APP_AVRCP_PANEL_F1 0x0071 92 #define APP_AVRCP_PANEL_F2 0x0072 93 #define APP_AVRCP_PANEL_F3 0x0073 94 #define APP_AVRCP_PANEL_F4 0x0074 95 #define APP_AVRCP_PANEL_F5 0x0075 96 97 #define APP_AVRCP_PANEL_VENDOR_UNIQUE 0x007E 98 99 #define APP_AVRCP_PANEL_NEXT_GROUP 0x017E 100 #define APP_AVRCP_PANEL_PREV_GROUP 0x027E 101 102 #define APP_AVRCP_PANEL_RESERVED 0x007F 103 104 105 typedef struct _CS_ADP_AVRCP_EVENT_{ 106 BT_ADDR bdaddr; 107 U32 avrcpparam; 108 }CS_ADP_AVRCP_EVENT; 109 110 111 void cs_adp_avrcp_send_key_stop(BT_ADDR bdaddr); 112 void cs_adp_avrcp_send_key_play(BT_ADDR bdaddr); 113 void cs_adp_avrcp_send_key_pause(BT_ADDR bdaddr); 114 void cs_adp_avrcp_send_key_forward(BT_ADDR bdaddr); 115 void cs_adp_avrcp_send_key_backward(BT_ADDR bdaddr); 116 void cs_adp_avrcp_send_key_volume_up(BT_ADDR bdaddr); 117 void cs_adp_avrcp_send_key_volume_down(BT_ADDR bdaddr); 118 Status_BTDef cs_adp_avrcp_send_volume_report(BT_ADDR bdaddr, U8 volume); 119 void cs_adp_avrcp_register( void); 120 void cs_adp_avrcp_init(void); 121 void cs_adp_avrcp_support_volume_sync(BOOL support); 122 #endif 123 124