summaryrefslogtreecommitdiff
path: root/libgupnp-dlna/gupnp-dlna-restriction.c
diff options
context:
space:
mode:
authorKrzesimir Nowak <krnowak@openismus.com>2013-01-04 16:00:11 +0100
committerJens Georg <mail@jensge.org>2013-01-16 11:27:55 +0100
commitb7724f7eeb64ebfd4ce4ba4486b41444e007e30e (patch)
treef65b7029c74aef4a6b9ffaa4cec4acdb051af7f4 /libgupnp-dlna/gupnp-dlna-restriction.c
parent2c2bdd36490b878a347601b9afb79757f120e678 (diff)
downloadgupnp-dlna-b7724f7eeb64ebfd4ce4ba4486b41444e007e30e.tar.gz
Document new API, fix annotations.
Most of the GUPnPDLNA*Information API is skipped by GObject Introspection, though. I have to learn whether it is possible to have API returning simple structs by value to be bindable.
Diffstat (limited to 'libgupnp-dlna/gupnp-dlna-restriction.c')
-rw-r--r--libgupnp-dlna/gupnp-dlna-restriction.c46
1 files changed, 46 insertions, 0 deletions
diff --git a/libgupnp-dlna/gupnp-dlna-restriction.c b/libgupnp-dlna/gupnp-dlna-restriction.c
index c31e150..5f67488 100644
--- a/libgupnp-dlna/gupnp-dlna-restriction.c
+++ b/libgupnp-dlna/gupnp-dlna-restriction.c
@@ -49,6 +49,12 @@ gupnp_dlna_restriction_new (const gchar *mime)
return restriction;
}
+/**
+ * gupnp_dlna_restriction_copy:
+ * @restriction: (transfer none): A restriction to copy.
+ *
+ * Returns: (transfer full): A copy of @restriction.
+ */
GUPnPDLNARestriction *
gupnp_dlna_restriction_copy (GUPnPDLNARestriction *restriction)
{
@@ -76,6 +82,12 @@ gupnp_dlna_restriction_copy (GUPnPDLNARestriction *restriction)
return dup;
}
+/**
+ * gupnp_dlna_restriction_free:
+ * @restriction: A restriction to free.
+ *
+ * Frees @restriction.
+ */
void
gupnp_dlna_restriction_free (GUPnPDLNARestriction *restriction)
{
@@ -135,6 +147,13 @@ gupnp_dlna_restriction_merge (GUPnPDLNARestriction *restriction,
gupnp_dlna_restriction_free (merged);
}
+/**
+ * gupnp_dlna_restriction_is_empty:
+ * @restriction: (transfer none): A restriction.
+ *
+ * Returns: %TRUE if @restriction is empty and has no MIME type,
+ * otherwise %FALSE.
+ */
gboolean
gupnp_dlna_restriction_is_empty (GUPnPDLNARestriction *restriction)
{
@@ -144,6 +163,15 @@ gupnp_dlna_restriction_is_empty (GUPnPDLNARestriction *restriction)
g_hash_table_size (restriction->entries) == 0);
}
+/**
+ * gupnp_dlna_restriction_to_string:
+ * @restriction: (transfer none): A restriction.
+ *
+ * Creates a string representation of @restriction.
+ *
+ * Returns: (transfer full): A string representation of
+ * @restriction. Free with g_free() when not needed.
+ */
gchar *
gupnp_dlna_restriction_to_string (GUPnPDLNARestriction *restriction)
{
@@ -169,6 +197,14 @@ gupnp_dlna_restriction_to_string (GUPnPDLNARestriction *restriction)
return g_string_free (str, FALSE);
}
+/**
+ * gupnp_dlna_restriction_get_mime:
+ * @restriction: (transfer none): A restriction.
+ *
+ * Gets @restriction's MIME type.
+ *
+ * Returns: (transfer none): MIME type. Do not modify.
+ */
const gchar *
gupnp_dlna_restriction_get_mime (GUPnPDLNARestriction *restriction)
{
@@ -177,6 +213,16 @@ gupnp_dlna_restriction_get_mime (GUPnPDLNARestriction *restriction)
return restriction->mime;
}
+/**
+ * gupnp_dlna_restriction_get_entries:
+ * @restriction: (transfer none): A restriction.
+ *
+ * Gets @restriction's entries. It is a string to #GUPnPDLNAValueList
+ * mapping.
+ *
+ * Returns: (transfer none) (element-type utf8 GUPnPDLNAValueList):
+ * Entries. Do not modify.
+ */
GHashTable *
gupnp_dlna_restriction_get_entries (GUPnPDLNARestriction *restriction)
{