summaryrefslogtreecommitdiff
path: root/libsoup/soup-date.c
diff options
context:
space:
mode:
authorDan Winship <danw@gnome.org>2009-07-08 16:33:16 -0400
committerDan Winship <danw@gnome.org>2010-04-28 20:49:23 -0400
commite4b50bfc892ba2e65ecff05425ed4ef10af38e3c (patch)
treed828fdbea4bdb4e4e3ee85fcf8b7092be4d9f7b8 /libsoup/soup-date.c
parent4bb1a311e44b58b0886260440e75081df3a9ba94 (diff)
downloadlibsoup-e4b50bfc892ba2e65ecff05425ed4ef10af38e3c.tar.gz
Add get methods for SoupCookie, SoupDate, and SoupURI fields
for added introspectability
Diffstat (limited to 'libsoup/soup-date.c')
-rw-r--r--libsoup/soup-date.c130
1 files changed, 130 insertions, 0 deletions
diff --git a/libsoup/soup-date.c b/libsoup/soup-date.c
index 5509af83..ce99ec5b 100644
--- a/libsoup/soup-date.c
+++ b/libsoup/soup-date.c
@@ -764,6 +764,136 @@ soup_date_is_past (SoupDate *date)
}
/**
+ * soup_date_get_year:
+ * @date: a #SoupDate
+ *
+ * Gets @date's year.
+ *
+ * Return value: @date's year
+ *
+ * Since: 2.32
+ **/
+int
+soup_date_get_year (SoupDate *date)
+{
+ return date->year;
+}
+
+/**
+ * soup_date_get_month:
+ * @date: a #SoupDate
+ *
+ * Gets @date's month.
+ *
+ * Return value: @date's month
+ *
+ * Since: 2.32
+ **/
+int
+soup_date_get_month (SoupDate *date)
+{
+ return date->month;
+}
+
+/**
+ * soup_date_get_day:
+ * @date: a #SoupDate
+ *
+ * Gets @date's day.
+ *
+ * Return value: @date's day
+ *
+ * Since: 2.32
+ **/
+int
+soup_date_get_day (SoupDate *date)
+{
+ return date->day;
+}
+
+/**
+ * soup_date_get_hour:
+ * @date: a #SoupDate
+ *
+ * Gets @date's hour.
+ *
+ * Return value: @date's hour
+ *
+ * Since: 2.32
+ **/
+int
+soup_date_get_hour (SoupDate *date)
+{
+ return date->hour;
+}
+
+/**
+ * soup_date_get_minute:
+ * @date: a #SoupDate
+ *
+ * Gets @date's minute.
+ *
+ * Return value: @date's minute
+ *
+ * Since: 2.32
+ **/
+int
+soup_date_get_minute (SoupDate *date)
+{
+ return date->minute;
+}
+
+/**
+ * soup_date_get_second:
+ * @date: a #SoupDate
+ *
+ * Gets @date's second.
+ *
+ * Return value: @date's second
+ *
+ * Since: 2.32
+ **/
+int
+soup_date_get_second (SoupDate *date)
+{
+ return date->second;
+}
+
+/**
+ * soup_date_get_utc:
+ * @date: a #SoupDate
+ *
+ * Gets @date's UTC flag
+ *
+ * Return value: %TRUE if @date is UTC.
+ *
+ * Since: 2.32
+ **/
+gboolean
+soup_date_get_utc (SoupDate *date)
+{
+ return date->utc;
+}
+
+/**
+ * soup_date_get_offset:
+ * @date: a #SoupDate
+ *
+ * Gets @date's offset from UTC.
+ *
+ * Return value: @date's offset from UTC. If soup_date_get_utc()
+ * returns %FALSE but soup_date_get_offset() returns 0, that means the
+ * date is a "floating" time with no associated offset information.
+ *
+ * Since: 2.32
+ **/
+int
+soup_date_get_offset (SoupDate *date)
+{
+ return date->offset;
+}
+
+/**
* soup_date_copy:
* @date: a #SoupDate
*