summaryrefslogtreecommitdiff
path: root/farstream
diff options
context:
space:
mode:
authorOlivier CrĂȘte <olivier.crete@collabora.com>2013-01-11 19:46:52 -0500
committerOlivier CrĂȘte <olivier.crete@collabora.com>2013-03-26 14:50:24 -0400
commit77df96b6b6fad5aac69dc73c06816d050f60a735 (patch)
tree2c7cab2492183fc425bee74c7c73150b9ee9dc86 /farstream
parent9676376e6c5e31fb83d205c33c1a755acd58f61e (diff)
downloadfarstream-77df96b6b6fad5aac69dc73c06816d050f60a735.tar.gz
candidate: Add helper function for pygi
This way, it can set a FsCandidateList to a GValue
Diffstat (limited to 'farstream')
-rw-r--r--farstream/fs-candidate.c17
-rw-r--r--farstream/fs-candidate.h2
2 files changed, 19 insertions, 0 deletions
diff --git a/farstream/fs-candidate.c b/farstream/fs-candidate.c
index 13d414ff..d50bcfce 100644
--- a/farstream/fs-candidate.c
+++ b/farstream/fs-candidate.c
@@ -259,3 +259,20 @@ fs_candidate_new_full (
return candidate;
}
+
+/**
+ * fs_value_set_candidate_list:
+ * @value: a #GValue of type #FS_TYPE_CANDIDATE_LIST
+ * @candidates: (element-type FsCandidate) (allow-none): A #GList of #FsCandidate
+ *
+ * This is for the bindings benefit. Works around the limitations of GObject
+ * introspection.
+ *
+ */
+
+void
+fs_value_set_candidate_list (GValue *value, GList *candidates)
+{
+ g_value_init (value, FS_TYPE_CANDIDATE_LIST);
+ g_value_set_boxed (value, candidates);
+}
diff --git a/farstream/fs-candidate.h b/farstream/fs-candidate.h
index 361bf25f..b8ad723f 100644
--- a/farstream/fs-candidate.h
+++ b/farstream/fs-candidate.h
@@ -156,6 +156,8 @@ FsCandidate *fs_candidate_new_full (
const gchar *password,
guint ttl);
+void fs_value_set_candidate_list (GValue *value, GList *candidates);
+
G_END_DECLS
#endif /* __FS_CANDIDATE_H__ */