Define the strings for wfd rtsp message and use these. 24/45224/1
authorSangkyu Park <sk1122.park@samsung.com>
Mon, 27 Jul 2015 06:57:09 +0000 (15:57 +0900)
committerSangkyu Park <sk1122.park@samsung.com>
Tue, 4 Aug 2015 00:46:22 +0000 (09:46 +0900)
Change-Id: I031444cd5750f1a6c878df5612d057c2543ef9f8
Signed-off-by: Sangkyu Park <sk1122.park@samsung.com>
packaging/libmm-scmirroring-common.spec
wfdconfig/include/wfdconfigmessage.h
wfdconfig/wfdconfigmessage.c

index 7866c0b..cbeb4b7 100755 (executable)
@@ -1,6 +1,6 @@
 Name:       libmm-scmirroring-common
 Summary:    Multimedia Framework Wifi-Display Common Library
-Version:    0.0.39
+Version:    0.0.40
 Release:    0
 Group:      System/Libraries
 License:    Apache License 2.0
index afabba3..d9c942b 100755 (executable)
 
 G_BEGIN_DECLS
 
+#define STRING_WFD_AUDIO_CODECS               "wfd_audio_codecs"
+#define STRING_WFD_VIDEO_FORMATS              "wfd_video_formats"
+#define STRING_WFD_3D_VIDEO_FORMATS           "wfd_3d_video_formats"
+#define STRING_WFD_CONTENT_PROTECTION         "wfd_content_protection"
+#define STRING_WFD_DISPLAY_EDID               "wfd_display_edid"
+#define STRING_WFD_COUPLED_SINK               "wfd_coupled_sink"
+#define STRING_WFD_TRIGGER_METHOD             "wfd_trigger_method"
+#define STRING_WFD_PRESENTATION_URL           "wfd_presentation_URL"
+#define STRING_WFD_CLIENT_RTP_PORTS           "wfd_client_rtp_ports"
+#define STRING_WFD_ROUTE                      "wfd_route"
+#define STRING_WFD_I2C                        "wfd_I2C"
+#define STRING_WFD_AV_FORMAT_CHANGE_TIMING    "wfd_av_format_change_timing"
+#define STRING_WFD_PREFERRED_DISPLAY_MODE     "wfd_preferred_display_mode"
+#define STRING_WFD_UIBC_CAPABILITY            "wfd_uibc_capability"
+#define STRING_WFD_UIBC_SETTING               "wfd_uibc_setting"
+#define STRING_WFD_STANDBY_RESUME_CAPABILITY  "wfd_standby_resume_capability"
+#define STRING_WFD_STANDBY                    "wfd_standby"
+#define STRING_WFD_CONNECTOR_TYPE             "wfd_connector_type"
+#define STRING_WFD_IDR_REQUEST                "wfd_idr_request"
+
 /**
  * WFDResult:
  * @WFD_OK: A successful return value
index 3f3d458..ba20888 100755 (executable)
@@ -266,7 +266,7 @@ wfdconfig_message_as_text(const WFDMessage *msg)
        /* list of audio codecs */
        if (msg->audio_codecs) {
                guint i = 0;
-               g_string_append_printf(lines, "wfd_audio_codecs");
+               g_string_append_printf(lines, STRING_WFD_AUDIO_CODECS);
                if (msg->audio_codecs->list) {
                        g_string_append_printf(lines, ":");
                        for (; i < msg->audio_codecs->count; i++) {
@@ -282,7 +282,7 @@ wfdconfig_message_as_text(const WFDMessage *msg)
 
        /* list of video codecs */
        if (msg->video_formats) {
-               g_string_append_printf(lines, "wfd_video_formats");
+               g_string_append_printf(lines, STRING_WFD_VIDEO_FORMATS);
                if (msg->video_formats->list) {
                        g_string_append_printf(lines, ":");
                        g_string_append_printf(lines, " %02x", msg->video_formats->list->native);
@@ -312,7 +312,7 @@ wfdconfig_message_as_text(const WFDMessage *msg)
 
        /* list of video 3D codecs */
        if (msg->video_3d_formats) {
-               g_string_append_printf(lines, "wfd_3d_video_formats");
+               g_string_append_printf(lines, STRING_WFD_3D_VIDEO_FORMATS);
                g_string_append_printf(lines, ":");
                if (msg->video_3d_formats->list) {
                        g_string_append_printf(lines, " %02x", msg->video_3d_formats->list->native);
@@ -339,7 +339,7 @@ wfdconfig_message_as_text(const WFDMessage *msg)
        }
 
        if (msg->content_protection) {
-               g_string_append_printf(lines, "wfd_content_protection");
+               g_string_append_printf(lines, STRING_WFD_CONTENT_PROTECTION);
                g_string_append_printf(lines, ":");
                if (msg->content_protection->hdcp2_spec) {
                        if (msg->content_protection->hdcp2_spec->hdcpversion) {
@@ -355,7 +355,7 @@ wfdconfig_message_as_text(const WFDMessage *msg)
        }
 
        if (msg->display_edid) {
-               g_string_append_printf(lines, "wfd_display_edid");
+               g_string_append_printf(lines, STRING_WFD_DISPLAY_EDID);
                g_string_append_printf(lines, ":");
                if (msg->display_edid->edid_supported) {
                        g_string_append_printf(lines, " %d", msg->display_edid->edid_supported);
@@ -370,7 +370,7 @@ wfdconfig_message_as_text(const WFDMessage *msg)
        }
 
        if (msg->coupled_sink) {
-               g_string_append_printf(lines, "wfd_coupled_sink");
+               g_string_append_printf(lines, STRING_WFD_COUPLED_SINK);
                g_string_append_printf(lines, ":");
                if (msg->coupled_sink->coupled_sink_cap) {
                        g_string_append_printf(lines, " %02x", msg->coupled_sink->coupled_sink_cap->status);
@@ -385,14 +385,14 @@ wfdconfig_message_as_text(const WFDMessage *msg)
        }
 
        if (msg->trigger_method) {
-               g_string_append_printf(lines, "wfd_trigger_method");
+               g_string_append_printf(lines, STRING_WFD_TRIGGER_METHOD);
                g_string_append_printf(lines, ":");
                g_string_append_printf(lines, " %s", msg->trigger_method->wfd_trigger_method);
                g_string_append_printf(lines, "\r\n");
        }
 
        if (msg->presentation_url) {
-               g_string_append_printf(lines, "wfd_presentation_URL");
+               g_string_append_printf(lines, STRING_WFD_PRESENTATION_URL);
                g_string_append_printf(lines, ":");
                if (msg->presentation_url->wfd_url0)
                        g_string_append_printf(lines, " %s", msg->presentation_url->wfd_url0);
@@ -406,7 +406,7 @@ wfdconfig_message_as_text(const WFDMessage *msg)
        }
 
        if (msg->client_rtp_ports) {
-               g_string_append_printf(lines, "wfd_client_rtp_ports");
+               g_string_append_printf(lines, STRING_WFD_CLIENT_RTP_PORTS);
                if (msg->client_rtp_ports->profile) {
                        g_string_append_printf(lines, ":");
                        g_string_append_printf(lines, " %s", msg->client_rtp_ports->profile);
@@ -418,14 +418,14 @@ wfdconfig_message_as_text(const WFDMessage *msg)
        }
 
        if (msg->route) {
-               g_string_append_printf(lines, "wfd_route");
+               g_string_append_printf(lines, STRING_WFD_ROUTE);
                g_string_append_printf(lines, ":");
                g_string_append_printf(lines, " %s", msg->route->destination);
                g_string_append_printf(lines, "\r\n");
        }
 
        if (msg->I2C) {
-               g_string_append_printf(lines, "wfd_I2C");
+               g_string_append_printf(lines, STRING_WFD_I2C);
                g_string_append_printf(lines, ":");
                if (msg->I2C->I2CPresent)
                        g_string_append_printf(lines, " %x", msg->I2C->I2C_port);
@@ -435,7 +435,7 @@ wfdconfig_message_as_text(const WFDMessage *msg)
        }
 
        if (msg->av_format_change_timing) {
-               g_string_append_printf(lines, "wfd_av_format_change_timing");
+               g_string_append_printf(lines, STRING_WFD_AV_FORMAT_CHANGE_TIMING);
                g_string_append_printf(lines, ":");
                g_string_append_printf(lines, " %010llx", msg->av_format_change_timing->PTS);
                g_string_append_printf(lines, " %010llx", msg->av_format_change_timing->DTS);
@@ -443,7 +443,7 @@ wfdconfig_message_as_text(const WFDMessage *msg)
        }
 
        if (msg->preferred_display_mode) {
-               g_string_append_printf(lines, "wfd_preferred_display_mode");
+               g_string_append_printf(lines, STRING_WFD_PREFERRED_DISPLAY_MODE);
                g_string_append_printf(lines, ":");
                if (msg->preferred_display_mode->displaymodesupported) {
                        g_string_append_printf(lines, " %06llx", msg->preferred_display_mode->p_clock);
@@ -463,7 +463,7 @@ wfdconfig_message_as_text(const WFDMessage *msg)
        }
 
        if (msg->uibc_capability) {
-               g_string_append_printf(lines, "wfd_uibc_capability");
+               g_string_append_printf(lines, STRING_WFD_UIBC_CAPABILITY);
                g_string_append_printf(lines, ":");
                if (msg->uibc_capability->uibcsupported) {
                        g_string_append_printf(lines, " input_category_list=");
@@ -557,7 +557,7 @@ wfdconfig_message_as_text(const WFDMessage *msg)
        }
 
        if (msg->uibc_setting) {
-               g_string_append_printf(lines, "wfd_uibc_setting");
+               g_string_append_printf(lines, STRING_WFD_UIBC_SETTING);
                g_string_append_printf(lines, ":");
                if (msg->uibc_setting->uibc_setting)
                        g_string_append_printf(lines, " enable");
@@ -567,7 +567,7 @@ wfdconfig_message_as_text(const WFDMessage *msg)
        }
 
        if (msg->standby_resume_capability) {
-               g_string_append_printf(lines, "wfd_standby_resume_capability");
+               g_string_append_printf(lines, STRING_WFD_STANDBY_RESUME_CAPABILITY);
                g_string_append_printf(lines, ":");
                if (msg->standby_resume_capability->standby_resume_cap)
                        g_string_append_printf(lines, " supported");
@@ -577,18 +577,18 @@ wfdconfig_message_as_text(const WFDMessage *msg)
        }
 
        if (msg->standby) {
-               g_string_append_printf(lines, "wfd_standby");
+               g_string_append_printf(lines, STRING_WFD_STANDBY);
                g_string_append_printf(lines, "\r\n");
        }
 
        if (msg->connector_type) {
-               g_string_append_printf(lines, "wfd_connector_type");
+               g_string_append_printf(lines, STRING_WFD_CONNECTOR_TYPE);
                g_string_append_printf(lines, ":");
                g_string_append_printf(lines, "\r\n");
        }
 
        if (msg->idr_request) {
-               g_string_append_printf(lines, "wfd_idr_request");
+               g_string_append_printf(lines, STRING_WFD_IDR_REQUEST);
                g_string_append_printf(lines, "\r\n");
        }
 
@@ -611,81 +611,81 @@ gchar *wfdconfig_parameter_names_as_text(const WFDMessage *msg)
 
        /* list of audio codecs */
        if (msg->audio_codecs) {
-               g_string_append_printf(lines, "wfd_audio_codecs");
+               g_string_append_printf(lines, STRING_WFD_AUDIO_CODECS);
                g_string_append_printf(lines, "\r\n");
        }
        /* list of video codecs */
        if (msg->video_formats) {
-               g_string_append_printf(lines, "wfd_video_formats");
+               g_string_append_printf(lines, STRING_WFD_VIDEO_FORMATS);
                g_string_append_printf(lines, "\r\n");
        }
        /* list of video 3D codecs */
        if (msg->video_3d_formats) {
-               g_string_append_printf(lines, "wfd_3d_video_formats");
+               g_string_append_printf(lines, STRING_WFD_3D_VIDEO_FORMATS);
                g_string_append_printf(lines, "\r\n");
        }
        if (msg->content_protection) {
-               g_string_append_printf(lines, "wfd_content_protection");
+               g_string_append_printf(lines, STRING_WFD_CONTENT_PROTECTION);
                g_string_append_printf(lines, "\r\n");
        }
        if (msg->display_edid) {
-               g_string_append_printf(lines, "wfd_display_edid");
+               g_string_append_printf(lines, STRING_WFD_DISPLAY_EDID);
                g_string_append_printf(lines, "\r\n");
        }
        if (msg->coupled_sink) {
-               g_string_append_printf(lines, "wfd_coupled_sink");
+               g_string_append_printf(lines, STRING_WFD_COUPLED_SINK);
                g_string_append_printf(lines, "\r\n");
        }
        if (msg->trigger_method) {
-               g_string_append_printf(lines, "wfd_trigger_method");
+               g_string_append_printf(lines, STRING_WFD_TRIGGER_METHOD);
                g_string_append_printf(lines, "\r\n");
        }
        if (msg->presentation_url) {
-               g_string_append_printf(lines, "wfd_presentation_URL");
+               g_string_append_printf(lines, STRING_WFD_PRESENTATION_URL);
                g_string_append_printf(lines, "\r\n");
        }
        if (msg->client_rtp_ports) {
-               g_string_append_printf(lines, "wfd_client_rtp_ports");
+               g_string_append_printf(lines, STRING_WFD_CLIENT_RTP_PORTS);
                g_string_append_printf(lines, "\r\n");
        }
        if (msg->route) {
-               g_string_append_printf(lines, "wfd_route");
+               g_string_append_printf(lines, STRING_WFD_ROUTE);
                g_string_append_printf(lines, "\r\n");
        }
        if (msg->I2C) {
-               g_string_append_printf(lines, "wfd_I2C");
+               g_string_append_printf(lines, STRING_WFD_I2C);
                g_string_append_printf(lines, "\r\n");
        }
        if (msg->av_format_change_timing) {
-               g_string_append_printf(lines, "wfd_av_format_change_timing");
+               g_string_append_printf(lines, STRING_WFD_AV_FORMAT_CHANGE_TIMING);
                g_string_append_printf(lines, "\r\n");
        }
        if (msg->preferred_display_mode) {
-               g_string_append_printf(lines, "wfd_preferred_display_mode");
+               g_string_append_printf(lines, STRING_WFD_PREFERRED_DISPLAY_MODE);
                g_string_append_printf(lines, "\r\n");
        }
        if (msg->uibc_capability) {
-               g_string_append_printf(lines, "wfd_uibc_capability");
+               g_string_append_printf(lines, STRING_WFD_UIBC_CAPABILITY);
                g_string_append_printf(lines, "\r\n");
        }
        if (msg->uibc_setting) {
-               g_string_append_printf(lines, "wfd_uibc_setting");
+               g_string_append_printf(lines, STRING_WFD_UIBC_SETTING);
                g_string_append_printf(lines, "\r\n");
        }
        if (msg->standby_resume_capability) {
-               g_string_append_printf(lines, "wfd_standby_resume_capability");
+               g_string_append_printf(lines, STRING_WFD_STANDBY_RESUME_CAPABILITY);
                g_string_append_printf(lines, "\r\n");
        }
        if (msg->standby) {
-               g_string_append_printf(lines, "wfd_standby");
+               g_string_append_printf(lines, STRING_WFD_STANDBY);
                g_string_append_printf(lines, "\r\n");
        }
        if (msg->connector_type) {
-               g_string_append_printf(lines, "wfd_connector_type");
+               g_string_append_printf(lines, STRING_WFD_CONNECTOR_TYPE);
                g_string_append_printf(lines, "\r\n");
        }
        if (msg->idr_request) {
-               g_string_append_printf(lines, "wfd_idr_request");
+               g_string_append_printf(lines, STRING_WFD_IDR_REQUEST);
                g_string_append_printf(lines, "\r\n");
        }
        return g_string_free(lines, FALSE);
@@ -768,7 +768,7 @@ wfdconfig_parse_line(WFDMessage *msg, gchar *buffer)
        /*g_print("wfdconfig_parse_line input: %s\n", buffer); */
        read_string_type_and_value(type, value, sizeof(type), sizeof(value), ':', p);
        /*g_print("wfdconfig_parse_line type:%s value:%s\n", type, value); */
-       if (!g_strcmp0(type, "wfd_audio_codecs")) {
+       if (!g_strcmp0(type, STRING_WFD_AUDIO_CODECS)) {
                msg->audio_codecs = g_new0(WFDAudioCodeclist, 1);
                if (strlen(v)) {
                        guint i = 0;
@@ -784,7 +784,7 @@ wfdconfig_parse_line(WFDMessage *msg, gchar *buffer)
                                WFD_SKIP_COMMA(v);
                        }
                }
-       } else if (!g_strcmp0(type, "wfd_video_formats")) {
+       } else if (!g_strcmp0(type, STRING_WFD_VIDEO_FORMATS)) {
                msg->video_formats = g_new0(WFDVideoCodeclist, 1);
                if (strlen(v)) {
                        msg->video_formats->count = 1;
@@ -819,7 +819,7 @@ wfdconfig_parse_line(WFDMessage *msg, gchar *buffer)
                                WFD_SKIP_SPACE(v);
                        }
                }
-       } else if (!g_strcmp0(type, "wfd_3d_video_formats")) {
+       } else if (!g_strcmp0(type, STRING_WFD_3D_VIDEO_FORMATS)) {
                msg->video_3d_formats = g_new0(WFD3DFormats, 1);
                if (strlen(v)) {
                        msg->video_3d_formats->count = 1;
@@ -850,7 +850,7 @@ wfdconfig_parse_line(WFDMessage *msg, gchar *buffer)
                                WFD_SKIP_SPACE(v);
                        }
                }
-       } else if (!g_strcmp0(type, "wfd_content_protection")) {
+       } else if (!g_strcmp0(type, STRING_WFD_CONTENT_PROTECTION)) {
                msg->content_protection = g_new0(WFDContentProtection, 1);
                if (strlen(v)) {
                        WFD_SKIP_SPACE(v);
@@ -863,7 +863,7 @@ wfdconfig_parse_line(WFDMessage *msg, gchar *buffer)
                                WFD_READ_STRING(msg->content_protection->hdcp2_spec->TCPPort);
                        }
                }
-       } else if (!g_strcmp0(type, "wfd_display_edid")) {
+       } else if (!g_strcmp0(type, STRING_WFD_DISPLAY_EDID)) {
                msg->display_edid = g_new0(WFDDisplayEdid, 1);
                if (strlen(v)) {
                        WFD_SKIP_SPACE(v);
@@ -897,7 +897,7 @@ wfdconfig_parse_line(WFDMessage *msg, gchar *buffer)
                                } else v += strlen(v);
                        }
                }
-       } else if (!g_strcmp0(type, "wfd_coupled_sink")) {
+       } else if (!g_strcmp0(type, STRING_WFD_COUPLED_SINK)) {
                msg->coupled_sink = g_new0(WFDCoupledSink, 1);
                if (strlen(v)) {
                        msg->coupled_sink->coupled_sink_cap = g_new0(WFDCoupled_sink_cap, 1);
@@ -906,13 +906,13 @@ wfdconfig_parse_line(WFDMessage *msg, gchar *buffer)
                        WFD_SKIP_SPACE(v);
                        WFD_READ_STRING(msg->coupled_sink->coupled_sink_cap->sink_address);
                }
-       } else if (!g_strcmp0(type, "wfd_trigger_method")) {
+       } else if (!g_strcmp0(type, STRING_WFD_TRIGGER_METHOD)) {
                msg->trigger_method = g_new0(WFDTriggerMethod, 1);
                if (strlen(v)) {
                        WFD_SKIP_SPACE(v);
                        WFD_READ_STRING(msg->trigger_method->wfd_trigger_method);
                }
-       } else if (!g_strcmp0(type, "wfd_presentation_URL")) {
+       } else if (!g_strcmp0(type, STRING_WFD_PRESENTATION_URL)) {
                msg->presentation_url = g_new0(WFDPresentationUrl, 1);
                if (strlen(v)) {
                        WFD_SKIP_SPACE(v);
@@ -920,7 +920,7 @@ wfdconfig_parse_line(WFDMessage *msg, gchar *buffer)
                        WFD_SKIP_SPACE(v);
                        WFD_READ_STRING(msg->presentation_url->wfd_url1);
                }
-       } else if (!g_strcmp0(type, "wfd_client_rtp_ports")) {
+       } else if (!g_strcmp0(type, STRING_WFD_CLIENT_RTP_PORTS)) {
                msg->client_rtp_ports = g_new0(WFDClientRtpPorts, 1);
                if (strlen(v)) {
                        WFD_SKIP_SPACE(v);
@@ -932,13 +932,13 @@ wfdconfig_parse_line(WFDMessage *msg, gchar *buffer)
                        WFD_SKIP_SPACE(v);
                        WFD_READ_STRING(msg->client_rtp_ports->mode);
                }
-       } else if (!g_strcmp0(type, "wfd_route")) {
+       } else if (!g_strcmp0(type, STRING_WFD_ROUTE)) {
                msg->route = g_new0(WFDRoute, 1);
                if (strlen(v)) {
                        WFD_SKIP_SPACE(v);
                        WFD_READ_STRING(msg->route->destination);
                }
-       } else if (!g_strcmp0(type, "wfd_I2C")) {
+       } else if (!g_strcmp0(type, STRING_WFD_I2C)) {
                msg->I2C = g_new0(WFDI2C, 1);
                if (strlen(v)) {
                        msg->I2C->I2CPresent = TRUE;
@@ -946,7 +946,7 @@ wfdconfig_parse_line(WFDMessage *msg, gchar *buffer)
                        WFD_READ_UINT32_DIGIT(msg->I2C->I2C_port);
                        if (msg->I2C->I2C_port) msg->I2C->I2CPresent = TRUE;
                }
-       } else if (!g_strcmp0(type, "wfd_av_format_change_timing")) {
+       } else if (!g_strcmp0(type, STRING_WFD_AV_FORMAT_CHANGE_TIMING)) {
                msg->av_format_change_timing = g_new0(WFDAVFormatChangeTiming, 1);
                if (strlen(v)) {
                        WFD_SKIP_SPACE(v);
@@ -954,7 +954,7 @@ wfdconfig_parse_line(WFDMessage *msg, gchar *buffer)
                        WFD_SKIP_SPACE(v);
                        WFD_READ_UINT32(msg->av_format_change_timing->DTS);
                }
-       } else if (!g_strcmp0(type, "wfd_preferred_display_mode")) {
+       } else if (!g_strcmp0(type, STRING_WFD_PREFERRED_DISPLAY_MODE)) {
                msg->preferred_display_mode = g_new0(WFDPreferredDisplayMode, 1);
                if (strlen(v)) {
                        WFD_SKIP_SPACE(v);
@@ -1009,7 +1009,7 @@ wfdconfig_parse_line(WFDMessage *msg, gchar *buffer)
                                WFD_SKIP_SPACE(v);
                        }
                }
-       } else if (!g_strcmp0(type, "wfd_uibc_capability")) {
+       } else if (!g_strcmp0(type, STRING_WFD_UIBC_CAPABILITY)) {
                msg->uibc_capability = g_new0(WFDUibcCapability, 1);
                if (strstr(v, "input_category_list")) {
                        gchar *tstring = NULL;
@@ -1117,7 +1117,7 @@ wfdconfig_parse_line(WFDMessage *msg, gchar *buffer)
                } else if (strstr(v, "none")) {
                        msg->uibc_capability->uibcsupported = FALSE;
                }
-       } else if (!g_strcmp0(type, "wfd_uibc_setting")) {
+       } else if (!g_strcmp0(type, STRING_WFD_UIBC_SETTING)) {
                msg->uibc_setting = g_new0(WFDUibcSetting, 1);
                if (strlen(v)) {
                        WFD_SKIP_SPACE(v);
@@ -1126,7 +1126,7 @@ wfdconfig_parse_line(WFDMessage *msg, gchar *buffer)
                        else
                                msg->uibc_setting->uibc_setting = FALSE;
                }
-       } else if (!g_strcmp0(type, "wfd_standby_resume_capability")) {
+       } else if (!g_strcmp0(type, STRING_WFD_STANDBY_RESUME_CAPABILITY)) {
                msg->standby_resume_capability = g_new0(WFDStandbyResumeCapability, 1);
                if (strlen(v)) {
                        WFD_SKIP_SPACE(v);
@@ -1135,17 +1135,17 @@ wfdconfig_parse_line(WFDMessage *msg, gchar *buffer)
                        else
                                msg->standby_resume_capability->standby_resume_cap = FALSE;
                }
-       } else if (!g_strcmp0(type, "wfd_standby")) {
+       } else if (!g_strcmp0(type, STRING_WFD_STANDBY)) {
                msg->standby = g_new0(WFDStandby, 1);
                msg->standby->wfd_standby = TRUE;
-       } else if (!g_strcmp0(type, "wfd_connector_type")) {
+       } else if (!g_strcmp0(type, STRING_WFD_CONNECTOR_TYPE)) {
                msg->connector_type = g_new0(WFDConnectorType, 1);
                if (strlen(v)) {
                        msg->connector_type->supported = TRUE;
                        WFD_SKIP_SPACE(v);
                        WFD_READ_UINT32(msg->connector_type->connector_type);
                }
-       } else if (!g_strcmp0(type, "wfd_idr_request")) {
+       } else if (!g_strcmp0(type, STRING_WFD_IDR_REQUEST)) {
                msg->idr_request = g_new0(WFDIdrRequest, 1);
                msg->idr_request->idr_request = TRUE;
        }
@@ -1300,17 +1300,17 @@ wfdconfig_message_dump(const WFDMessage *msg)
        }
 
        if (msg->content_protection) {
-               wfd_debug("wfd_content_protection");
+               wfd_debug(STRING_WFD_CONTENT_PROTECTION);
                wfd_debug("\r\n");
        }
 
        if (msg->display_edid) {
-               wfd_debug("wfd_display_edid");
+               wfd_debug(STRING_WFD_DISPLAY_EDID);
                wfd_debug("\r\n");
        }
 
        if (msg->coupled_sink) {
-               wfd_debug("wfd_coupled_sink");
+               wfd_debug(STRING_WFD_COUPLED_SINK);
                wfd_debug("\r\n");
        }
 
@@ -1319,7 +1319,7 @@ wfdconfig_message_dump(const WFDMessage *msg)
        }
 
        if (msg->presentation_url) {
-               wfd_debug("wfd_presentation_URL");
+               wfd_debug(STRING_WFD_PRESENTATION_URL);
                wfd_debug("\r\n");
        }
 
@@ -1335,22 +1335,22 @@ wfdconfig_message_dump(const WFDMessage *msg)
        }
 
        if (msg->route) {
-               wfd_debug("wfd_route");
+               wfd_debug(STRING_WFD_ROUTE);
                wfd_debug("\r\n");
        }
 
        if (msg->I2C) {
-               wfd_debug("wfd_I2C");
+               wfd_debug(STRING_WFD_I2C);
                wfd_debug("\r\n");
        }
 
        if (msg->av_format_change_timing) {
-               wfd_debug("wfd_av_format_change_timing");
+               wfd_debug(STRING_WFD_AV_FORMAT_CHANGE_TIMING);
                wfd_debug("\r\n");
        }
 
        if (msg->preferred_display_mode) {
-               wfd_debug("wfd_preferred_display_mode");
+               wfd_debug(STRING_WFD_PREFERRED_DISPLAY_MODE);
                wfd_debug("\r\n");
        }
 
@@ -1443,22 +1443,22 @@ wfdconfig_message_dump(const WFDMessage *msg)
        }
 
        if (msg->standby_resume_capability) {
-               wfd_debug("wfd_standby_resume_capability");
+               wfd_debug(STRING_WFD_STANDBY_RESUME_CAPABILITY);
                wfd_debug("\r\n");
        }
 
        if (msg->standby) {
-               wfd_debug("wfd_standby");
+               wfd_debug(STRING_WFD_STANDBY);
                wfd_debug("\r\n");
        }
 
        if (msg->connector_type) {
-               wfd_debug("wfd_connector_type");
+               wfd_debug(STRING_WFD_CONNECTOR_TYPE);
                wfd_debug("\r\n");
        }
 
        if (msg->idr_request) {
-               wfd_debug("wfd_idr_request");
+               wfd_debug(STRING_WFD_IDR_REQUEST);
                wfd_debug("\r\n");
        }