[libgda: 1/2] wip/doc



commit 68117b13b46a3a04009fd27b7c7bf0a32f08721e
Author: Pavlo Solntsev <p sun fun gmail com>
Date:   Thu Jun 11 03:20:34 2020 +0000

    wip/doc

 doc/C/libgda/libgda-6.0-sections.txt | 19 ++++++++++++++++++
 libgda/gda-value.c                   | 38 +++++++++++++++++++++++++++++++++---
 libgda/gda-value.h                   |  1 +
 3 files changed, 55 insertions(+), 3 deletions(-)
---
diff --git a/doc/C/libgda/libgda-6.0-sections.txt b/doc/C/libgda/libgda-6.0-sections.txt
index 117f14bb2..df3fa9ef2 100644
--- a/doc/C/libgda/libgda-6.0-sections.txt
+++ b/doc/C/libgda/libgda-6.0-sections.txt
@@ -1085,6 +1085,25 @@ GdaTime
 gda_time_copy
 gda_time_free
 gda_time_valid
+gda_time_new
+gda_time_new_from_date_time
+gda_time_new_from_values
+gda_time_get_fraction
+gda_time_get_hour
+gda_time_get_minute
+gda_time_get_second
+gda_time_get_tz
+gda_time_get_timezone
+gda_time_set_fraction
+gda_time_set_hour
+gda_time_set_minute
+gda_time_set_second
+gda_time_set_timezone
+gda_time_to_string
+gda_time_to_string_local
+gda_time_to_string_utc
+gda_time_to_timezone
+gda_time_to_utc
 gda_value_get_time
 gda_value_set_time
 gda_value_new_time_from_timet
diff --git a/libgda/gda-value.c b/libgda/gda-value.c
index fe57ae658..49c2e3fc4 100644
--- a/libgda/gda-value.c
+++ b/libgda/gda-value.c
@@ -1472,6 +1472,9 @@ string_to_time (const GValue *src, GValue *dest)
 
 /**
  * gda_time_copy:
+ * @time: an instance of #GdaTime to copy
+ *
+ * Create a copy of #GdaTime
  *
  * Returns: (transfer full): a pointer to a new #GdaTime struct
  */
@@ -1487,12 +1490,14 @@ gda_time_copy (const GdaTime* time)
  * gda_time_free:
  * @time: a #GdaTime to free
  *
+ * Free resources holded by the #GdaTime instance
+ *
  * Since: 6.0
  */
 void
-gda_time_free (GdaTime* boxed)
+gda_time_free (GdaTime* time)
 {
-       g_date_time_unref ((GDateTime*) boxed);
+       g_date_time_unref ((GDateTime*) time);
 }
 
 static void
@@ -1542,6 +1547,7 @@ gda_time_new (void)
 
 /**
  * gda_time_to_string:
+ * @time: #GdaTime instance to convert to string
  *
  * Creates a string representation of a #GdaTime in local time
  * with the timezone designation.
@@ -1559,6 +1565,7 @@ gda_time_to_string (GdaTime *time)
 
 /**
  * gda_time_to_string_local:
+ * @time: #GdaTime instance to convert to string
  *
  * Creates a string representation of a #GdaTime in local time
  * without timezone designation.
@@ -1578,6 +1585,7 @@ gda_time_to_string_local (GdaTime *time)
 
 /**
  * gda_time_to_string_utc:
+ * @time: #GdaTime instance to convert to string
  *
  * Creates a string representation of a #GdaTime in UTC time
  * with time zone indication.
@@ -1614,6 +1622,8 @@ gda_time_to_utc (GdaTime *time)
  * @fraction: fraction of seconds
  * @timezone: timezone in seconds added to UTC
  *
+ * Create new instance of #GdaTime from the provided values.
+ *
  * Returns: (transfer full): the a new value storing a time
  */
 GdaTime*
@@ -1641,6 +1651,8 @@ gda_time_new_from_values (gushort hour, gushort minute, gushort second, gulong f
  * gda_time_new_from_date_time:
  * @dt: a #GDateTime to get time from
  *
+ * Creates new instcne of #GdaTime from #GDateTime.
+ *
  * Returns: (transfer full): the a new value storing a time
  * Since: 6.0
  */
@@ -1654,6 +1666,8 @@ gda_time_new_from_date_time (GDateTime *dt)
  * gda_time_get_hour:
  * @time: a #GdaTime value to get hours from
  *
+ * Get hours from the #GdaTime instance
+ *
  * Since: 6.0
  */
 gushort
@@ -1667,6 +1681,8 @@ gda_time_get_hour (const GdaTime* time)
  * @time: a #GdaTime value to set hours to
  * @hour: new hours to set to
  *
+ * Set hour component to the #GdaTime instance.
+ *
  * Since: 6.0
  */
 void
@@ -1683,6 +1699,8 @@ gda_time_set_hour (GdaTime* time, gushort hour)
  * gda_time_get_minute:
  * @time: a #GdaTime value to get minutes from
  *
+ * Get minutes from the #GdaTime instance
+ *
  * Since: 6.0
  */
 gushort
@@ -1696,6 +1714,8 @@ gda_time_get_minute (const GdaTime* time)
  * @time: a #GdaTime value to set hours to
  * @minute: new minutes to set to
  *
+ * Set minutes to the #GdaTime instance
+ *
  * Since: 6.0
  */
 void
@@ -1712,6 +1732,8 @@ gda_time_set_minute (GdaTime* time, gushort minute)
  * gda_time_get_second:
  * @time: a #GdaTime value to get seconds from
  *
+ * Get second component from #GdaTime
+ *
  * Since: 6.0
  */
 gushort
@@ -1725,6 +1747,8 @@ gda_time_get_second (const GdaTime* time)
  * @time: a #GdaTime value to set hours to
  * @second: new seconds to set to
  *
+ * Set second component
+ *
  * Since: 6.0
  */
 void
@@ -1741,6 +1765,10 @@ gda_time_set_second (GdaTime* time, gushort second)
  * gda_time_get_fraction:
  * @time: a #GdaTime value to get fraction of seconds from
  *
+ * Extract fraction of seconds from the instance of #GdaTime
+ *
+ * Returns: fraction of seconds
+ *
  * Since: 6.0
  */
 gulong
@@ -1761,6 +1789,8 @@ gda_time_get_fraction (const GdaTime* time)
  * @time: a #GdaTime value to set hours to
  * @fraction: new second fraction to set to.
  *
+ * Set new value for the second fraction
+ *
  * Since: 6.0
  */
 void
@@ -1809,6 +1839,8 @@ gda_time_get_tz (const GdaTime* time)
  * @time: a #GdaTime value to set time zone to
  * @timezone: new time zone to set to. See #gda_time_change_timezone
  *
+ * Set timezone component for the instance of #GdaTime
+ *
  * Since: 6.0
  */
 void
@@ -1858,7 +1890,7 @@ gda_time_to_timezone (GdaTime *time, GTimeZone *ntz)
 }
 
 /**
- * gda_timestamp_copy:
+ * gda_date_time_copy:
  *
  * Returns: (transfer full):
  */
diff --git a/libgda/gda-value.h b/libgda/gda-value.h
index b86f49a09..440d3ea1f 100644
--- a/libgda/gda-value.h
+++ b/libgda/gda-value.h
@@ -253,6 +253,7 @@ gushort                           gda_value_get_ushort (const GValue *value);
 void                              gda_value_set_ushort (GValue *value, const gushort val);
 const GdaTime                    *gda_value_get_time (const GValue *value);
 void                              gda_value_set_time (GValue *value, const GdaTime *val);
+void                              gda_time_set_timezone (GdaTime* time, glong timezone);
 
 
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]