[farsight2/master] Transform FS_COMPONENT_* into an enum

Olivier Crête olivier.crete at collabora.co.uk
Tue Dec 23 15:19:32 PST 2008


---
 docs/libs/farsight-libs-sections.txt |    1 +
 gst-libs/gst/farsight/fs-candidate.h |   18 +++++++++++++-----
 2 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/docs/libs/farsight-libs-sections.txt b/docs/libs/farsight-libs-sections.txt
index d1021cd..8ec95cd 100644
--- a/docs/libs/farsight-libs-sections.txt
+++ b/docs/libs/farsight-libs-sections.txt
@@ -87,6 +87,7 @@ fs_error_quark
 <TITLE>FsCandidate</TITLE>
 FsCandidateType
 FsNetworkProtocol
+FsComponentType
 FsCandidate
 fs_candidate_destroy
 fs_candidate_copy
diff --git a/gst-libs/gst/farsight/fs-candidate.h b/gst-libs/gst/farsight/fs-candidate.h
index 1ced7d2..18076d1 100644
--- a/gst-libs/gst/farsight/fs-candidate.h
+++ b/gst-libs/gst/farsight/fs-candidate.h
@@ -67,12 +67,20 @@ typedef enum
   FS_NETWORK_PROTOCOL_TCP
 } FsNetworkProtocol;
 
-/*
- * These are defined in the ICE-19 draft
+/**
+ * FsComponentType:
+ * @FS_COMPONENT_RTP: This component is for RTP data
+ * @FS_COMPONENT_RTCP: This component is for RTCP control
+ *
+ * This enum contains the component IDs defined in ICE-19
  */
 
-#define FS_COMPONENT_RTP        (1)
-#define FS_COMPONENT_RTCP       (2)
+typedef enum
+{
+  FS_COMPONENT_RTP = 1,
+  FS_COMPONENT_RTCP = 2
+} FsComponentType;
+
 
 typedef struct _FsCandidate FsCandidate;
 
@@ -80,7 +88,7 @@ typedef struct _FsCandidate FsCandidate;
  * FsCandidate:
  * @candidate_id: string identifier of the candidate
  * @foundation: a string representing the foundation of this candidate (maximum 32 chars)
- * @component_id: value between 1 and 256 indicating which component this candidate represents (1 is RTP, 2 is RTCP)
+ * @component_id: value between 1 and 256 indicating which component this candidate represents (1 is RTP, 2 is RTCP, #FsComponentType can be used here)
  * @ip: IP in dotted format
  * @port: Port to use
  * @base_ip: IP of base in dotted format as defined in ICE-19.
-- 
1.5.6.5




More information about the farsight-commits mailing list