From 1a05114e49a01a9c9317967ce66c67c5c7d59aaf Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Fri, 28 Mar 2014 14:25:32 +0100 Subject: [PATCH] Use #define instead of enum. --- coreapi/linphonecall.c | 8 ++++---- coreapi/linphonecore.h | 15 +++------------ 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/coreapi/linphonecall.c b/coreapi/linphonecall.c index 4ff3537fb..2d200c8cf 100644 --- a/coreapi/linphonecall.c +++ b/coreapi/linphonecall.c @@ -2706,7 +2706,7 @@ void linphone_call_background_tasks(LinphoneCall *call, bool_t one_second_elapse freemsg(call->stats[LINPHONE_CALL_STATS_VIDEO].received_rtcp); call->stats[LINPHONE_CALL_STATS_VIDEO].received_rtcp = evd->packet; evd->packet = NULL; - call->stats[LINPHONE_CALL_STATS_VIDEO].updated = LinphoneCallStatsReceivedRTCPUpdate; + call->stats[LINPHONE_CALL_STATS_VIDEO].updated = LINPHONE_CALL_STATS_RECEIVED_RTCP_UPDATE; update_local_stats(&call->stats[LINPHONE_CALL_STATS_VIDEO],(MediaStream*)call->videostream); if (lc->vtable.call_stats_updated) lc->vtable.call_stats_updated(lc, call, &call->stats[LINPHONE_CALL_STATS_VIDEO]); @@ -2716,7 +2716,7 @@ void linphone_call_background_tasks(LinphoneCall *call, bool_t one_second_elapse freemsg(call->stats[LINPHONE_CALL_STATS_VIDEO].sent_rtcp); call->stats[LINPHONE_CALL_STATS_VIDEO].sent_rtcp = evd->packet; evd->packet = NULL; - call->stats[LINPHONE_CALL_STATS_VIDEO].updated = LinphoneCallStatsSentRTCPUpdate; + call->stats[LINPHONE_CALL_STATS_VIDEO].updated = LINPHONE_CALL_STATS_SENT_RTCP_UPDATE; update_local_stats(&call->stats[LINPHONE_CALL_STATS_VIDEO],(MediaStream*)call->videostream); if (lc->vtable.call_stats_updated) lc->vtable.call_stats_updated(lc, call, &call->stats[LINPHONE_CALL_STATS_VIDEO]); @@ -2751,7 +2751,7 @@ void linphone_call_background_tasks(LinphoneCall *call, bool_t one_second_elapse freemsg(call->stats[LINPHONE_CALL_STATS_AUDIO].received_rtcp); call->stats[LINPHONE_CALL_STATS_AUDIO].received_rtcp = evd->packet; evd->packet = NULL; - call->stats[LINPHONE_CALL_STATS_AUDIO].updated = LinphoneCallStatsReceivedRTCPUpdate; + call->stats[LINPHONE_CALL_STATS_AUDIO].updated = LINPHONE_CALL_STATS_RECEIVED_RTCP_UPDATE; update_local_stats(&call->stats[LINPHONE_CALL_STATS_AUDIO],(MediaStream*)call->audiostream); if (lc->vtable.call_stats_updated) lc->vtable.call_stats_updated(lc, call, &call->stats[LINPHONE_CALL_STATS_AUDIO]); @@ -2761,7 +2761,7 @@ void linphone_call_background_tasks(LinphoneCall *call, bool_t one_second_elapse freemsg(call->stats[LINPHONE_CALL_STATS_AUDIO].sent_rtcp); call->stats[LINPHONE_CALL_STATS_AUDIO].sent_rtcp = evd->packet; evd->packet = NULL; - call->stats[LINPHONE_CALL_STATS_AUDIO].updated = LinphoneCallStatsSentRTCPUpdate; + call->stats[LINPHONE_CALL_STATS_AUDIO].updated = LINPHONE_CALL_STATS_SENT_RTCP_UPDATE; update_local_stats(&call->stats[LINPHONE_CALL_STATS_AUDIO],(MediaStream*)call->audiostream); if (lc->vtable.call_stats_updated) lc->vtable.call_stats_updated(lc, call, &call->stats[LINPHONE_CALL_STATS_AUDIO]); diff --git a/coreapi/linphonecore.h b/coreapi/linphonecore.h index 12b550a6f..f4f34b8c6 100644 --- a/coreapi/linphonecore.h +++ b/coreapi/linphonecore.h @@ -577,19 +577,10 @@ enum _LinphoneUpnpState{ **/ typedef enum _LinphoneUpnpState LinphoneUpnpState; -/** - * Enum describing what has been updated in a LinphoneCallStats object. -**/ -enum _LinphoneCallStatsRTCPUpdate { - LinphoneCallStatsReceivedRTCPUpdate, /**< received_rtcp field of LinphoneCallStats object has been updated */ - LinphoneCallStatsSentRTCPUpdate /**< sent_rtcp field of LinphoneCallStats object has been updated */ -}; -/** - * Enum describing what has been updated in a LinphoneCallStats object. -**/ +#define LINPHONE_CALL_STATS_RECEIVED_RTCP_UPDATE (1 << 0) /**< received_rtcp field of LinphoneCallStats object has been updated */ +#define LINPHONE_CALL_STATS_SENT_RTCP_UPDATE (1 << 1) /**< sent_rtcp field of LinphoneCallStats object has been updated */ -typedef enum _LinphoneCallStatsRTCPUpdate LinphoneCallStatsRTCPUpdate; /** * The LinphoneCallStats objects carries various statistic informations regarding quality of audio or video streams. @@ -621,7 +612,7 @@ struct _LinphoneCallStats { float upload_bandwidth; /**