[farsight2/master] Remove unused candidate api methods

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


---
 gst-libs/gst/farsight/fs-candidate.c |   50 ----------------------------------
 gst-libs/gst/farsight/fs-candidate.h |    6 ----
 python/pyfarsight.defs               |   18 ------------
 3 files changed, 0 insertions(+), 74 deletions(-)

diff --git a/gst-libs/gst/farsight/fs-candidate.c b/gst-libs/gst/farsight/fs-candidate.c
index 42719ce..0803c39 100644
--- a/gst-libs/gst/farsight/fs-candidate.c
+++ b/gst-libs/gst/farsight/fs-candidate.c
@@ -160,56 +160,6 @@ fs_candidate_list_copy (const GList *candidate_list)
 }
 
 /**
- * fs_candidate_get_by_id:
- * @candidate_list: a list of #FsCandidate
- * @candidate_id: the id of the candidate to extract
- *
- * Searches in candidate_list for the candidate indentified by candidate_id
- *
- * Returns: a #FsCandidate or NULL if not found
- */
-FsCandidate *
-fs_candidate_get_by_id (const GList *candidate_list,
-                        const gchar *candidate_id)
-{
-  FsCandidate *cand = NULL;
-  const GList *lp;
-  FsCandidate *cand_copy = NULL;
-
-  for (lp = candidate_list; lp; lp = g_list_next (lp)) {
-    cand = (FsCandidate *) lp->data;
-    if (g_ascii_strcasecmp (cand->candidate_id, candidate_id) == 0)
-    {
-      cand_copy = fs_candidate_copy (cand);
-      break;
-    }
-  }
-  return cand_copy;
-}
-
-/**
- * fs_candidate_are_equal:
- * @cand1: first #FsCandidate to compare
- * @cand2: second #FsCandidate to compare
- *
- * Compares two #FsCandidate to see if they are equivalent.
- *
- * Returns: True if equivalent.
- */
-gboolean
-fs_candidate_are_equal (const FsCandidate *cand1,
-    const FsCandidate *cand2)
-{
-  /* TODO we compare just the ip and port for now
-   * is this enough ? think about it some more */
-  if ((g_ascii_strcasecmp (cand1->ip, cand2->ip) == 0) &&
-      (cand1->port == cand2->port))
-    return TRUE;
-  else
-    return FALSE;
-}
-
-/**
  * fs_candidate_new:
  * @id: The id of the candidate (must be unique for ICE)
  * @component_id: The component this candidate is for
diff --git a/gst-libs/gst/farsight/fs-candidate.h b/gst-libs/gst/farsight/fs-candidate.h
index 1a81fcc..b22ba07 100644
--- a/gst-libs/gst/farsight/fs-candidate.h
+++ b/gst-libs/gst/farsight/fs-candidate.h
@@ -136,12 +136,6 @@ void fs_candidate_list_destroy (GList *candidate_list);
 
 GList *fs_candidate_list_copy (const GList *candidate_list);
 
-FsCandidate *fs_candidate_get_by_id (const GList *candidate_list,
-                                     const gchar *candidate_id);
-
-gboolean fs_candidate_are_equal (const FsCandidate *cand1,
-                                 const FsCandidate *cand2);
-
 FsCandidate * fs_candidate_new (
     const gchar *id,
     guint component_id,
diff --git a/python/pyfarsight.defs b/python/pyfarsight.defs
index 5a8ec06..bc04dc5 100644
--- a/python/pyfarsight.defs
+++ b/python/pyfarsight.defs
@@ -204,24 +204,6 @@
   )
 )
 
-(define-function fs_candidate_get_by_id
-  (c-name "fs_candidate_get_by_id")
-  (return-type "FsCandidate*")
-  (parameters
-    '("const-GList*" "candidate_list")
-    '("const-gchar*" "candidate_id")
-  )
-)
-
-(define-method are_equal
-  (of-object "FsCandidate")
-  (c-name "fs_candidate_are_equal")
-  (return-type "gboolean")
-  (parameters
-    '("const-FsCandidate*" "cand2")
-  )
-)
-
 (define-function fs_candidate_new
   (c-name "fs_candidate_new")
   (is-constructor-of "FsCandidate")
-- 
1.5.6.5




More information about the farsight-commits mailing list