/******************************************************************************* ** ** Function dump_vendor_op ** ** Description converts the enum types bt_vendor_opcode into strings ** ** Returns String ** *******************************************************************************/ static const char* dump_vendor_op(bt_vendor_opcode_t opcode) { switch(opcode) { CASE_RETURN_STR(BT_VND_OP_POWER_CTRL); CASE_RETURN_STR(BT_VND_OP_FW_CFG); CASE_RETURN_STR(BT_VND_OP_SCO_CFG); CASE_RETURN_STR(BT_VND_OP_USERIAL_OPEN); CASE_RETURN_STR(BT_VND_OP_USERIAL_CONFIG); CASE_RETURN_STR(BT_VND_OP_FW_DL_COMPLETE); CASE_RETURN_STR(BT_VND_OP_FW_DL_STATUS); CASE_RETURN_STR(BT_VND_OP_USERIAL_CLOSE); CASE_RETURN_STR(BT_VND_OP_GET_LPM_IDLE_TIMEOUT); CASE_RETURN_STR(BT_VND_OP_LPM_SET_MODE); CASE_RETURN_STR(BT_VND_OP_LPM_WAKE_SET_STATE); CASE_RETURN_STR(BT_VND_OP_LPM_SET_IDLE_STATE); CASE_RETURN_STR(BT_VND_OP_SET_AUDIO_STATE); default: return "unknown opcode"; } }
char *eventType2str(eventType x) { switch(x) { CASE_RETURN_STR(evtUndefined); CASE_RETURN_STR(evtNullEvent); CASE_RETURN_STR(evtIgnore); CASE_RETURN_STR(evtAnyEvent); CASE_RETURN_STR(evtNewConnection); CASE_RETURN_STR(evtTimeout); CASE_RETURN_STR(evtSignalled); CASE_RETURN_STR(evtException); CASE_RETURN_STR(evtCritical); CASE_RETURN_STR(evtProcessCreate); CASE_RETURN_STR(evtProcessAttach); CASE_RETURN_STR(evtProcessExit); /* used to have exited normally, or via signal, now in info */ CASE_RETURN_STR(evtProcessStop); CASE_RETURN_STR(evtProcessSelfTermination); CASE_RETURN_STR(evtThreadCreate); CASE_RETURN_STR(evtThreadExit); CASE_RETURN_STR(evtThreadContextStart); CASE_RETURN_STR(evtThreadContextStop); CASE_RETURN_STR(evtLoadLibrary); CASE_RETURN_STR(evtUnloadLibrary); CASE_RETURN_STR(evtSyscallEntry); CASE_RETURN_STR(evtSyscallExit); CASE_RETURN_STR(evtSuspended); CASE_RETURN_STR(evtRequestedStop); CASE_RETURN_STR(evtInstPointTrap); CASE_RETURN_STR(evtDebugStep); CASE_RETURN_STR(evtDynamicCall); CASE_RETURN_STR(evtRPCSignal); CASE_RETURN_STR(evtError); CASE_RETURN_STR(evtPreFork); CASE_RETURN_STR(evtPostFork); CASE_RETURN_STR(evtExec); CASE_RETURN_STR(evtOneTimeCode); CASE_RETURN_STR(evtUserEvent); CASE_RETURN_STR(evtShutDown); CASE_RETURN_STR(evtProcessInit); CASE_RETURN_STR(evtProcessLoadedRT); CASE_RETURN_STR(evtProcessInitDone); CASE_RETURN_STR(evtThreadDetect); CASE_RETURN_STR(evtLastEvent); CASE_RETURN_STR(evtLwpAttach); default: fprintf(stderr, "%s[%d]: unknown event type\n", FILE__, __LINE__); } return "unknown_event_type"; }