1Message API reference 2 3The message API allows any object within pulseaudio to register a message 4handler. A message handler is a function that can be called by clients using 5PA_COMMAND_SEND_OBJECT_MESSAGE. A message consists at least of an object path 6and a message command, both specified as strings. Additional parameters can 7be specified using a single string in JSON format, but are not mandatory. 8 9The message handler returns an error number as defined in def.h and also returns 10a string in the "response" variable. Non-empty response will be in JSON format. 11 12The reference further down lists available messages, their parameters 13and return values. 14 15Reference: 16 17Object path: /core 18Message: list-handlers 19Parameters: None 20Return value: JSON array of handler description objects 21 [{"name":"Handler name","description":"Description"} ...] 22 23Object path: /card/bluez_card.XX_XX_XX_XX_XX_XX/bluez 24Message: list-codecs 25Parameters: None 26Return value: JSON array of codec description objects 27 [{"name":"codec1","description":"Codec 1"} ...] 28 29Object path: /card/bluez_card.XX_XX_XX_XX_XX_XX/bluez 30Message: get-codec 31Parameters: None 32Return value: "codec name" 33 34Object path: /card/bluez_card.XX_XX_XX_XX_XX_XX/bluez 35Message: switch-codec 36Parameters: "codec name" 37Return value: none 38 39Description: Set if card profile selection should be sticky instead of being automated 40Object path: /card/<card_name> 41Message: set-profile-sticky 42Parameters: JSON "true" or "false" 43Return value: none 44 45Description: Get if card profile selection should be sticky instead of being automated 46Object path: /card/<card_name> 47Message: get-profile-sticky 48Parameters: None 49Return value: JSON "true" or "false" 50