[libgdata] core: Rename gdata_parser_int64_from_element()
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgdata] core: Rename gdata_parser_int64_from_element()
- Date: Sat, 14 Apr 2012 10:41:55 +0000 (UTC)
commit 282d44478b67a7c86f92fb4fa416c47c1cdc101a
Author: Philip Withnall <philip tecnocode co uk>
Date: Sat Apr 14 11:13:40 2012 +0100
core: Rename gdata_parser_int64_from_element()
So that a new int64 parsing method can be added.
gdata/gdata-access-rule.c | 2 +-
gdata/gdata-entry.c | 4 ++--
gdata/gdata-feed.c | 4 ++--
gdata/gdata-parser.c | 10 +++++-----
gdata/gdata-parser.h | 4 ++--
gdata/services/calendar/gdata-calendar-calendar.c | 2 +-
gdata/services/calendar/gdata-calendar-event.c | 2 +-
gdata/services/contacts/gdata-contacts-contact.c | 2 +-
gdata/services/contacts/gdata-contacts-group.c | 2 +-
gdata/services/documents/gdata-documents-entry.c | 6 +++---
gdata/services/picasaweb/gdata-picasaweb-album.c | 2 +-
gdata/services/picasaweb/gdata-picasaweb-file.c | 2 +-
gdata/services/youtube/gdata-youtube-group.c | 4 ++--
13 files changed, 23 insertions(+), 23 deletions(-)
---
diff --git a/gdata/gdata-access-rule.c b/gdata/gdata-access-rule.c
index 9386d57..a0a27aa 100644
--- a/gdata/gdata-access-rule.c
+++ b/gdata/gdata-access-rule.c
@@ -286,7 +286,7 @@ parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_da
GDataAccessRule *self = GDATA_ACCESS_RULE (parsable);
if (gdata_parser_is_namespace (node, "http://www.w3.org/2007/app") == TRUE &&
- gdata_parser_int64_from_element (node, "edited", P_REQUIRED | P_NO_DUPES, &(self->priv->edited), &success, error) == TRUE) {
+ gdata_parser_int64_time_from_element (node, "edited", P_REQUIRED | P_NO_DUPES, &(self->priv->edited), &success, error) == TRUE) {
return success;
} else if (gdata_parser_is_namespace (node, "http://schemas.google.com/acl/2007") == TRUE) {
if (xmlStrcmp (node->name, (xmlChar*) "role") == 0) {
diff --git a/gdata/gdata-entry.c b/gdata/gdata-entry.c
index 4f16b06..b46cc8e 100644
--- a/gdata/gdata-entry.c
+++ b/gdata/gdata-entry.c
@@ -431,8 +431,8 @@ parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_da
gdata_parser_string_from_element (node, "id", P_REQUIRED | P_NON_EMPTY | P_NO_DUPES, &(priv->id), &success, error) == TRUE ||
gdata_parser_string_from_element (node, "summary", P_NONE, &(priv->summary), &success, error) == TRUE ||
gdata_parser_string_from_element (node, "rights", P_NONE, &(priv->rights), &success, error) == TRUE ||
- gdata_parser_int64_from_element (node, "updated", P_REQUIRED | P_NO_DUPES, &(priv->updated), &success, error) == TRUE ||
- gdata_parser_int64_from_element (node, "published", P_REQUIRED | P_NO_DUPES, &(priv->published), &success, error) == TRUE ||
+ gdata_parser_int64_time_from_element (node, "updated", P_REQUIRED | P_NO_DUPES, &(priv->updated), &success, error) == TRUE ||
+ gdata_parser_int64_time_from_element (node, "published", P_REQUIRED | P_NO_DUPES, &(priv->published), &success, error) == TRUE ||
gdata_parser_object_from_element_setter (node, "category", P_REQUIRED, GDATA_TYPE_CATEGORY,
gdata_entry_add_category, parsable, &success, error) == TRUE ||
gdata_parser_object_from_element_setter (node, "link", P_REQUIRED, GDATA_TYPE_LINK,
diff --git a/gdata/gdata-feed.c b/gdata/gdata-feed.c
index 868ed94..fd9b845 100644
--- a/gdata/gdata-feed.c
+++ b/gdata/gdata-feed.c
@@ -463,8 +463,8 @@ parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_da
_gdata_feed_add_author, self, &success, error) == TRUE ||
gdata_parser_object_from_element (node, "generator", P_REQUIRED | P_NO_DUPES, GDATA_TYPE_GENERATOR,
&(self->priv->generator), &success, error) == TRUE ||
- gdata_parser_int64_from_element (node, "updated", P_REQUIRED | P_NO_DUPES,
- &(self->priv->updated), &success, error) == TRUE ||
+ gdata_parser_int64_time_from_element (node, "updated", P_REQUIRED | P_NO_DUPES,
+ &(self->priv->updated), &success, error) == TRUE ||
gdata_parser_string_from_element (node, "rights", P_NONE, &(self->priv->rights), &success, error) == TRUE) {
return success;
} else {
diff --git a/gdata/gdata-parser.c b/gdata/gdata-parser.c
index 4f8eb48..8710c65 100644
--- a/gdata/gdata-parser.c
+++ b/gdata/gdata-parser.c
@@ -388,7 +388,7 @@ gdata_parser_string_from_element (xmlNode *element, const gchar *element_name, G
}
/*
- * gdata_parser_time_val_from_element:
+ * gdata_parser_int64_time_from_element:
* @element: the element to check against
* @element_name: the name of the element to parse
* @options: a bitwise combination of parsing options from #GDataParserOptions, or %P_NONE
@@ -408,17 +408,17 @@ gdata_parser_string_from_element (xmlNode *element, const gchar *element_name, G
* If @element matches @element_name and all of the checks specified by @options pass, %TRUE will be returned, @error will be unset and
* @success will be set to %TRUE.
*
- * The reason for returning the success of the parsing in @success is so that calls to gdata_parser_time_val_from_element() can be chained
+ * The reason for returning the success of the parsing in @success is so that calls to gdata_parser_int64_time_from_element() can be chained
* together in a large "or" statement based on their return values, for the purposes of determining whether any of the calls matched
- * a given @element. If any of the calls to gdata_parser_time_val_from_element() return %TRUE, the value of @success can be examined.
+ * a given @element. If any of the calls to gdata_parser_int64_time_from_element() return %TRUE, the value of @success can be examined.
*
* Return value: %TRUE if @element matched @element_name, %FALSE otherwise
*
* Since: 0.7.0
*/
gboolean
-gdata_parser_int64_from_element (xmlNode *element, const gchar *element_name, GDataParserOptions options,
- gint64 *output, gboolean *success, GError **error)
+gdata_parser_int64_time_from_element (xmlNode *element, const gchar *element_name, GDataParserOptions options,
+ gint64 *output, gboolean *success, GError **error)
{
xmlChar *text;
GTimeVal time_val;
diff --git a/gdata/gdata-parser.h b/gdata/gdata-parser.h
index 997de5c..0d9e90c 100644
--- a/gdata/gdata-parser.h
+++ b/gdata/gdata-parser.h
@@ -71,8 +71,8 @@ gboolean gdata_parser_is_namespace (xmlNode *element, const gchar *namespace_uri
gboolean gdata_parser_string_from_element (xmlNode *element, const gchar *element_name, GDataParserOptions options,
gchar **output, gboolean *success, GError **error);
-gboolean gdata_parser_int64_from_element (xmlNode *element, const gchar *element_name, GDataParserOptions options,
- gint64 *output, gboolean *success, GError **error);
+gboolean gdata_parser_int64_time_from_element (xmlNode *element, const gchar *element_name, GDataParserOptions options,
+ gint64 *output, gboolean *success, GError **error);
gboolean gdata_parser_object_from_element_setter (xmlNode *element, const gchar *element_name, GDataParserOptions options, GType object_type,
gpointer /* GDataParserSetterFunc */ _setter, gpointer /* GDataParsable * */ _parent_parsable,
gboolean *success, GError **error);
diff --git a/gdata/services/calendar/gdata-calendar-calendar.c b/gdata/services/calendar/gdata-calendar-calendar.c
index 3b4d79a..713fc83 100644
--- a/gdata/services/calendar/gdata-calendar-calendar.c
+++ b/gdata/services/calendar/gdata-calendar-calendar.c
@@ -366,7 +366,7 @@ parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_da
GDataCalendarCalendar *self = GDATA_CALENDAR_CALENDAR (parsable);
if (gdata_parser_is_namespace (node, "http://www.w3.org/2007/app") == TRUE &&
- gdata_parser_int64_from_element (node, "edited", P_REQUIRED | P_NO_DUPES, &(self->priv->edited), &success, error) == TRUE) {
+ gdata_parser_int64_time_from_element (node, "edited", P_REQUIRED | P_NO_DUPES, &(self->priv->edited), &success, error) == TRUE) {
return success;
} else if (gdata_parser_is_namespace (node, "http://schemas.google.com/gCal/2005") == TRUE) {
if (xmlStrcmp (node->name, (xmlChar*) "timezone") == 0) {
diff --git a/gdata/services/calendar/gdata-calendar-event.c b/gdata/services/calendar/gdata-calendar-event.c
index 5596913..48ff4d8 100644
--- a/gdata/services/calendar/gdata-calendar-event.c
+++ b/gdata/services/calendar/gdata-calendar-event.c
@@ -516,7 +516,7 @@ parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_da
GDataCalendarEvent *self = GDATA_CALENDAR_EVENT (parsable);
if (gdata_parser_is_namespace (node, "http://www.w3.org/2007/app") == TRUE &&
- gdata_parser_int64_from_element (node, "edited", P_REQUIRED | P_NO_DUPES, &(self->priv->edited), &success, error) == TRUE) {
+ gdata_parser_int64_time_from_element (node, "edited", P_REQUIRED | P_NO_DUPES, &(self->priv->edited), &success, error) == TRUE) {
return success;
} else if (gdata_parser_is_namespace (node, "http://schemas.google.com/g/2005") == TRUE) {
if (gdata_parser_object_from_element_setter (node, "when", P_REQUIRED, GDATA_TYPE_GD_WHEN,
diff --git a/gdata/services/contacts/gdata-contacts-contact.c b/gdata/services/contacts/gdata-contacts-contact.c
index b72b6ec..e052fdf 100644
--- a/gdata/services/contacts/gdata-contacts-contact.c
+++ b/gdata/services/contacts/gdata-contacts-contact.c
@@ -791,7 +791,7 @@ parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_da
GDataContactsContact *self = GDATA_CONTACTS_CONTACT (parsable);
if (gdata_parser_is_namespace (node, "http://www.w3.org/2007/app") == TRUE &&
- gdata_parser_int64_from_element (node, "edited", P_REQUIRED | P_NO_DUPES, &(self->priv->edited), &success, error) == TRUE) {
+ gdata_parser_int64_time_from_element (node, "edited", P_REQUIRED | P_NO_DUPES, &(self->priv->edited), &success, error) == TRUE) {
return success;
} else if (gdata_parser_is_namespace (node, "http://www.w3.org/2005/Atom") == TRUE && xmlStrcmp (node->name, (xmlChar*) "id") == 0) {
/* We have to override <id> parsing to fix the projection. Modify it in-place so that the parser in GDataEntry will pick up
diff --git a/gdata/services/contacts/gdata-contacts-group.c b/gdata/services/contacts/gdata-contacts-group.c
index a1f5145..711c358 100644
--- a/gdata/services/contacts/gdata-contacts-group.c
+++ b/gdata/services/contacts/gdata-contacts-group.c
@@ -320,7 +320,7 @@ parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_da
GDataContactsGroup *self = GDATA_CONTACTS_GROUP (parsable);
if (gdata_parser_is_namespace (node, "http://www.w3.org/2007/app") == TRUE &&
- gdata_parser_int64_from_element (node, "edited", P_REQUIRED | P_NO_DUPES, &(self->priv->edited), &success, error) == TRUE) {
+ gdata_parser_int64_time_from_element (node, "edited", P_REQUIRED | P_NO_DUPES, &(self->priv->edited), &success, error) == TRUE) {
return success;
} else if (gdata_parser_is_namespace (node, "http://www.w3.org/2005/Atom") == TRUE && xmlStrcmp (node->name, (xmlChar*) "id") == 0) {
/* We have to override <id> parsing to fix the projection. Modify it in-place so that the parser in GDataEntry will pick up the
diff --git a/gdata/services/documents/gdata-documents-entry.c b/gdata/services/documents/gdata-documents-entry.c
index 4eb7cdb..69f1178 100644
--- a/gdata/services/documents/gdata-documents-entry.c
+++ b/gdata/services/documents/gdata-documents-entry.c
@@ -437,11 +437,11 @@ parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_da
GDataDocumentsEntry *self = GDATA_DOCUMENTS_ENTRY (parsable);
if (gdata_parser_is_namespace (node, "http://www.w3.org/2007/app") == TRUE &&
- gdata_parser_int64_from_element (node, "edited", P_REQUIRED | P_NO_DUPES, &(self->priv->edited), &success, error) == TRUE) {
+ gdata_parser_int64_time_from_element (node, "edited", P_REQUIRED | P_NO_DUPES, &(self->priv->edited), &success, error) == TRUE) {
return success;
} else if (gdata_parser_is_namespace (node, "http://schemas.google.com/g/2005") == TRUE) {
- if (gdata_parser_int64_from_element (node, "lastViewed", P_REQUIRED | P_NO_DUPES,
- &(self->priv->last_viewed), &success, error) == TRUE ||
+ if (gdata_parser_int64_time_from_element (node, "lastViewed", P_REQUIRED | P_NO_DUPES,
+ &(self->priv->last_viewed), &success, error) == TRUE ||
gdata_parser_object_from_element_setter (node, "feedLink", P_REQUIRED, GDATA_TYPE_LINK,
gdata_entry_add_link, self, &success, error) == TRUE ||
gdata_parser_object_from_element (node, "lastModifiedBy", P_REQUIRED, GDATA_TYPE_AUTHOR,
diff --git a/gdata/services/picasaweb/gdata-picasaweb-album.c b/gdata/services/picasaweb/gdata-picasaweb-album.c
index 9dc2110..1b1ad11 100644
--- a/gdata/services/picasaweb/gdata-picasaweb-album.c
+++ b/gdata/services/picasaweb/gdata-picasaweb-album.c
@@ -660,7 +660,7 @@ parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_da
/* TODO: media:group should also be P_NO_DUPES, but we can't, as priv->media_group has to be pre-populated
* in order for things like gdata_picasaweb_album_get_tags() to work. */
if (gdata_parser_is_namespace (node, "http://www.w3.org/2007/app") == TRUE &&
- gdata_parser_int64_from_element (node, "edited", P_REQUIRED | P_NO_DUPES, &(self->priv->edited), &success, error) == TRUE) {
+ gdata_parser_int64_time_from_element (node, "edited", P_REQUIRED | P_NO_DUPES, &(self->priv->edited), &success, error) == TRUE) {
return success;
} else if (gdata_parser_is_namespace (node, "http://search.yahoo.com/mrss/") == TRUE &&
gdata_parser_object_from_element (node, "group", P_REQUIRED, GDATA_TYPE_MEDIA_GROUP,
diff --git a/gdata/services/picasaweb/gdata-picasaweb-file.c b/gdata/services/picasaweb/gdata-picasaweb-file.c
index 6d69ccc..60f9159 100644
--- a/gdata/services/picasaweb/gdata-picasaweb-file.c
+++ b/gdata/services/picasaweb/gdata-picasaweb-file.c
@@ -896,7 +896,7 @@ parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_da
/* TODO: media:group should also be P_NO_DUPES, but we can't, as priv->media_group has to be pre-populated
* in order for things like gdata_picasaweb_file_set_description() to work. */
if (gdata_parser_is_namespace (node, "http://www.w3.org/2007/app") == TRUE &&
- gdata_parser_int64_from_element (node, "edited", P_REQUIRED | P_NO_DUPES, &(self->priv->edited), &success, error) == TRUE) {
+ gdata_parser_int64_time_from_element (node, "edited", P_REQUIRED | P_NO_DUPES, &(self->priv->edited), &success, error) == TRUE) {
return success;
} else if (gdata_parser_is_namespace (node, "http://search.yahoo.com/mrss/") == TRUE &&
gdata_parser_object_from_element (node, "group", P_REQUIRED, GDATA_TYPE_MEDIA_GROUP,
diff --git a/gdata/services/youtube/gdata-youtube-group.c b/gdata/services/youtube/gdata-youtube-group.c
index e7f2671..b2fe427 100644
--- a/gdata/services/youtube/gdata-youtube-group.c
+++ b/gdata/services/youtube/gdata-youtube-group.c
@@ -103,8 +103,8 @@ parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_da
if (gdata_parser_string_from_element (node, "videoid", P_NO_DUPES, &(self->priv->video_id), &success, error) == TRUE ||
gdata_parser_string_from_element (node, "aspectRatio", P_REQUIRED | P_NO_DUPES,
&(self->priv->aspect_ratio), &success, error) == TRUE ||
- gdata_parser_int64_from_element (node, "uploaded", P_REQUIRED | P_NO_DUPES,
- &(self->priv->uploaded), &success, error) == TRUE) {
+ gdata_parser_int64_time_from_element (node, "uploaded", P_REQUIRED | P_NO_DUPES,
+ &(self->priv->uploaded), &success, error) == TRUE) {
return success;
} else if (xmlStrcmp (node->name, (xmlChar*) "duration") == 0) {
/* yt:duration */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]