[farsight2/master] Add fs_candidate_new method
Olivier Crête
olivier.crete at collabora.co.uk
Tue Dec 23 15:21:00 PST 2008
---
docs/libs/farsight-libs-sections.txt | 1 +
gst-libs/gst/farsight/fs-candidate.c | 20 ++++++++++++++++++++
gst-libs/gst/farsight/fs-candidate.h | 7 +++++++
3 files changed, 28 insertions(+), 0 deletions(-)
diff --git a/docs/libs/farsight-libs-sections.txt b/docs/libs/farsight-libs-sections.txt
index f158aa7..fe14249 100644
--- a/docs/libs/farsight-libs-sections.txt
+++ b/docs/libs/farsight-libs-sections.txt
@@ -90,6 +90,7 @@ FsCandidateType
FsNetworkProtocol
FsComponentType
FsCandidate
+fs_candidate_new
fs_candidate_destroy
fs_candidate_copy
fs_candidate_list_destroy
diff --git a/gst-libs/gst/farsight/fs-candidate.c b/gst-libs/gst/farsight/fs-candidate.c
index 231a095..5c994f3 100644
--- a/gst-libs/gst/farsight/fs-candidate.c
+++ b/gst-libs/gst/farsight/fs-candidate.c
@@ -214,3 +214,23 @@ fs_candidate_are_equal (const FsCandidate *cand1,
else
return FALSE;
}
+
+
+FsCandidate *
+fs_candidate_new (
+ const gchar *id,
+ FsCandidateType type,
+ FsNetworkProtocol proto,
+ const gchar *ip,
+ guint port)
+{
+ FsCandidate *candidate = g_new0 (FsCandidate, 1);
+
+ candidate->candidate_id = g_strdup (id);
+ candidate->type = type;
+ candidate->proto = proto;
+ candidate->ip = g_strdup (ip);
+ candidate->port = port;
+
+ return candidate;
+}
diff --git a/gst-libs/gst/farsight/fs-candidate.h b/gst-libs/gst/farsight/fs-candidate.h
index c00e129..178fda0 100644
--- a/gst-libs/gst/farsight/fs-candidate.h
+++ b/gst-libs/gst/farsight/fs-candidate.h
@@ -140,5 +140,12 @@ FsCandidate *fs_candidate_get_by_id (const GList *candidate_list,
gboolean fs_candidate_are_equal (const FsCandidate *cand1,
const FsCandidate *cand2);
+FsCandidate * fs_candidate_new (
+ const gchar *id,
+ FsCandidateType type,
+ FsNetworkProtocol proto,
+ const gchar *ip,
+ guint port);
+
G_END_DECLS
#endif /* __FS_CANDIDATE_H__ */
--
1.5.6.5
More information about the farsight-commits
mailing list