From 12a08f1f1579604bd3e7ded5d329300df9f696a8 Mon Sep 17 00:00:00 2001 From: Janos Kovacs Date: Mon, 31 Dec 2012 13:02:38 +0200 Subject: [PATCH] extapi: move the the static *_name[] tables from .h to .c file --- murphy/extapi.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ murphy/node.h | 53 ----------------------------------------------------- 2 files changed, 52 insertions(+), 53 deletions(-) diff --git a/murphy/extapi.c b/murphy/extapi.c index f0f0358..4fefc37 100644 --- a/murphy/extapi.c +++ b/murphy/extapi.c @@ -52,6 +52,58 @@ struct pa_extapi { pa_idxset *subscribed; }; +static const char *mir_direction_names[] = { + [mir_direction_unknown] = "unknown", + [mir_input] = "input", + [mir_output] = "output" +}; + +static const char *mir_implement_names[] = { + [mir_implementation_unknown] = "unknown", + [mir_device] = "device", + [mir_stream] = "stream" +}; + +static const char *mir_location_names[] = { + [mir_location_unknown] = "unknown", + [mir_internal] = "internal", + [mir_external] = "external" +}; + +static const char *mir_node_type_names[512] = { + [mir_node_type_unknown] = "unknown", + [mir_radio] = "radio", + [mir_player] = "player", + [mir_navigator] = "navigator", + [mir_game] = "game", + [mir_browser] = "browser", + [mir_phone] = "phone", + [mir_event] = "event", + [mir_null] = "null", + [mir_speakers] = "speakers", + [mir_front_speakers] = "front_speakers", + [mir_rear_speakers] = "rear_speakers", + [mir_microphone] = "microphone", + [mir_jack] = "jack", + [mir_spdif] "spdif", + [mir_hdmi] = "hdmi", + [mir_wired_headset] = "wired_headset", + [mir_wired_headphone] = "wired_headphone", + [mir_usb_headset] ="usb_headset", + [mir_usb_headphone] = "usb_headphone", + [mir_bluetooth_sco] = "bluetooth_sco", + [mir_bluetooth_a2dp] = "bluetooth_a2dp", + [mir_bluetooth_carkit] = "bluetooth_carkit", + [mir_bluetooth_source] = "bluetooth_source", + [mir_bluetooth_sink] = "bluetoohth_sink" +}; + +static const char *mir_privacy_names[] = { + [mir_privacy_unknown] ="unknown", + [mir_public] = "public", + [mir_private] = "private" +}; + static void *conn_hash(uint32_t connid); struct pa_extapi *pa_extapi_init(struct userdata *u) { diff --git a/murphy/node.h b/murphy/node.h index 961ddc8..9e7d4e9 100644 --- a/murphy/node.h +++ b/murphy/node.h @@ -37,36 +37,18 @@ enum mir_direction { mir_output }; -static const char *mir_direction_names[] = { - [mir_direction_unknown] = "unknown", - [mir_input] = "input", - [mir_output] = "output" -}; - enum mir_implement { mir_implementation_unknown = 0, mir_device, mir_stream }; -static const char *mir_implement_names[] = { - [mir_implementation_unknown] = "unknown", - [mir_device] = "device", - [mir_stream] = "stream" -}; - enum mir_location { mir_location_unknown = 0, mir_internal, mir_external }; -static const char *mir_location_names[] = { - [mir_location_unknown] = "unknown", - [mir_internal] = "internal", - [mir_external] = "external" -}; - enum mir_node_type { mir_node_type_unknown = 0, @@ -109,46 +91,12 @@ enum mir_node_type { mir_user_defined_start = 256 }; -static const char *mir_node_type_names[512] = { - [mir_node_type_unknown] = "unknown", - [mir_radio] = "radio", - [mir_player] = "player", - [mir_navigator] = "navigator", - [mir_game] = "game", - [mir_browser] = "browser", - [mir_phone] = "phone", - [mir_event] = "event", - [mir_null] = "null", - [mir_speakers] = "speakers", - [mir_front_speakers] = "front_speakers", - [mir_rear_speakers] = "rear_speakers", - [mir_microphone] = "microphone", - [mir_jack] = "jack", - [mir_spdif] "spdif", - [mir_hdmi] = "hdmi", - [mir_wired_headset] = "wired_headset", - [mir_wired_headphone] = "wired_headphone", - [mir_usb_headset] ="usb_headset", - [mir_usb_headphone] = "usb_headphone", - [mir_bluetooth_sco] = "bluetooth_sco", - [mir_bluetooth_a2dp] = "bluetooth_a2dp", - [mir_bluetooth_carkit] = "bluetooth_carkit", - [mir_bluetooth_source] = "bluetooth_source", - [mir_bluetooth_sink] = "bluetoohth_sink" -}; - enum mir_privacy { mir_privacy_unknown = 0, mir_public, mir_private }; -static const char *mir_privacy_names[] = { - [mir_privacy_unknown] ="unknown", - [mir_public] = "public", - [mir_private] = "private" -}; - struct pa_node_card { uint32_t index; char *profile; @@ -212,7 +160,6 @@ const char *mir_direction_str(mir_direction); const char *mir_implement_str(mir_implement); const char *mir_location_str(mir_location); const char *mir_node_type_str(mir_node_type); -const char *mir_node_type_str(mir_node_type); const char *mir_privacy_str(mir_privacy); #endif -- 2.7.4