# HG changeset patch
# User rosfran
# Date 1174427424 0
# Node ID d04e08f9893a2bfe875346746ac02334fbf97442
# Parent c1601c03cc7821c7123aab67d87f3dbfb688b145
[svn r426] Put more DOxygen documentation.
diff -r c1601c03cc78 -r d04e08f9893a gmyth/src/gmyth_backendinfo.c
--- a/gmyth/src/gmyth_backendinfo.c Tue Mar 20 21:23:58 2007 +0000
+++ b/gmyth/src/gmyth_backendinfo.c Tue Mar 20 21:50:24 2007 +0000
@@ -93,7 +93,8 @@
G_OBJECT_CLASS (gmyth_backend_info_parent_class)->finalize (object);
}
-/** Creates a new instance of GMythBackendInfo.
+/**
+ * Creates a new instance of GMythBackendInfo.
*
* @return a new instance of GMythBackendInfo.
*/
@@ -106,6 +107,18 @@
return backend_info;
}
+/**
+ * Creates a new instance of GMythBackendInfo, based on a given set of
+ * configuration parameters.
+ *
+ * @param hostname The hostname to the MythTV backend server.
+ * @param username The user name to the MythTV backend MySQL server.
+ * @param password The password to the user of the MythTV backend MySQL server.
+ * @param db_name The database name of the MythTV backend, stored on the MySQL server.
+ * @param port The port number of the MythTV backend server (commonly is 6543).
+ *
+ * @return a new instance of GMythBackendInfo.
+ */
GMythBackendInfo*
gmyth_backend_info_new_full (const gchar *hostname, const gchar *username,
const gchar *password, const gchar *db_name, gint port)
@@ -122,6 +135,14 @@
return backend_info;
}
+/**
+ * Creates a new instance of GMythBackendInfo, based on the
+ * MythTV's backend server URI string.
+ *
+ * @param uri_str The URI string pointing to the MythTV backend server.
+ *
+ * @return a new instance of GMythBackendInfo.
+ */
GMythBackendInfo*
gmyth_backend_info_new_with_uri ( const gchar *uri_str )
{
@@ -248,6 +269,14 @@
return backend_info->port;
}
+/**
+ * Creates a new instance of GMythURI, based on the GMythBackendInfo instance to the
+ * MythTV's backend server.
+ *
+ * @param backend_info The GMythBackendInfo instance.
+ *
+ * @return an instance of GMythURI, created from a GMythBackendInfo.
+ */
GMythURI*
gmyth_backend_info_get_uri (GMythBackendInfo *backend_info)
{
diff -r c1601c03cc78 -r d04e08f9893a gmyth/src/gmyth_uri.c
--- a/gmyth/src/gmyth_uri.c Tue Mar 20 21:23:58 2007 +0000
+++ b/gmyth/src/gmyth_uri.c Tue Mar 20 21:50:24 2007 +0000
@@ -380,6 +380,14 @@
}
+/**
+ * Compares 2 URI instances, and checks them for equality.
+ *
+ * @param uri The first GMythURI instance for comparison.
+ * @param uri The second GMythURI instance for comparison.
+ *
+ * @return true
, if these two URI instances are equals.
+ */
gboolean
gmyth_uri_is_equals( GMythURI* uri1, GMythURI* uri2 )
{
@@ -387,6 +395,13 @@
gmyth_uri_get_port( uri1 ) == gmyth_uri_get_port( uri2 ) );
}
+/**
+ * Checks if the URI instance represents a LiveTV recording.
+ *
+ * @param uri The GMythURI instance.
+ *
+ * @return true
, if the URI points to LiveTV content.
+ */
gboolean
gmyth_uri_is_livetv( GMythURI* uri )
{
@@ -409,7 +424,8 @@
*
* @param uri The GMythURI instance.
*
- * @return The channel name, got from the substring "?channel=[channel_name]".
+ * @return The channel name, got from the substring "?channel=[channel_name]"
+ * of the URI string.
*/
gchar*
gmyth_uri_get_channel_name( GMythURI* uri )
@@ -422,8 +438,6 @@
if ( channel_query != NULL )
{
- gmyth_debug( "TV Channel is in the following URI segment: %s", channel_query );
-
gchar **chan_key_value = g_strsplit( gmyth_uri_get_query( uri ), "=", 2 );
/* gmyth_debug( "Channel tuple is [ %s, %s ]", chan_key_value[0], chan_key_value[1] ); */
@@ -443,6 +457,14 @@
}
+/**
+ * Gets the channel number from a URI instance.
+ *
+ * @param uri The GMythURI instance.
+ *
+ * @return The channel number, got from the substring "?channel=[channel_number]"
+ * of the URI string, or -1
it if couldn't be converted.
+ */
gint
gmyth_uri_get_channel_num( GMythURI* uri )
{