示例#1
0
static void
gdata_youtube_comment_class_init (GDataYouTubeCommentClass *klass)
{
	GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
	GDataEntryClass *entry_class = GDATA_ENTRY_CLASS (klass);

	gobject_class->get_property = gdata_youtube_comment_get_property;
	gobject_class->set_property = gdata_youtube_comment_set_property;

	entry_class->kind_term = "http://gdata.youtube.com/schemas/2007#comment";

	/**
	 * GDataYouTubeComment:parent-comment-uri:
	 *
	 * The URI of the parent comment to this one, or %NULL if this comment is a top-level comment.
	 *
	 * See the documentation for #GDataYouTubeComment for an explanation of the semantics of parent comment URIs.
	 *
	 * Since: 0.10.0
	 */
	g_object_class_install_property (gobject_class, PROP_PARENT_COMMENT_URI,
	                                 g_param_spec_string ("parent-comment-uri",
	                                                      "Parent comment URI", "The URI of the parent comment to this one.",
	                                                      NULL,
	                                                      G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
}
示例#2
0
static void
gdata_documents_pdf_class_init (GDataDocumentsPdfClass *klass)
{
	GDataEntryClass *entry_class = GDATA_ENTRY_CLASS (klass);

	entry_class->kind_term = "http://schemas.google.com/docs/2007#pdf";
}
示例#3
0
static void gdata_entry_finalize (GObject *obj)
{
	GDataEntryPrivate *priv;
	GDataEntry *self = GDATA_ENTRY(obj);
	GObjectClass *parent_class;
	GDataEntryClass *klass;

	priv = GDATA_ENTRY_GET_PRIVATE(self);
	if (priv->authors != NULL) {
		g_slist_foreach(priv->authors, (GFunc) destroy_authors, NULL);
		g_slist_free(priv->authors);
	}
	if (priv->links != NULL) {
		g_slist_foreach(priv->links, (GFunc) destroy_links, NULL);
		g_slist_free(priv->links);
	}

	if (priv->categories != NULL) {
		g_slist_foreach(priv->categories, (GFunc) destroy_categories, NULL);
		g_slist_free(priv->categories);
	}

	if (priv->email_addresses != NULL) {
		g_slist_foreach(priv->email_addresses, (GFunc) destroy_email_address, NULL);
		g_slist_free(priv->email_addresses);
	}

	if (priv->im_addresses != NULL) {
		g_slist_foreach(priv->im_addresses, (GFunc) destroy_im_address, NULL);
		g_slist_free(priv->im_addresses);
	}

	if (priv->organizations != NULL) {
		g_slist_foreach(priv->organizations, (GFunc) destroy_organization, NULL);
		g_slist_free(priv->organizations);
	}

	if (priv->phone_numbers != NULL) {
		g_slist_foreach(priv->phone_numbers, (GFunc) destroy_phone_number, NULL);
		g_slist_free(priv->phone_numbers);
	}

	if (priv->postal_addresses != NULL) {
		g_slist_foreach(priv->postal_addresses, (GFunc) destroy_postal_address, NULL);
		g_slist_free(priv->postal_addresses);
	}

	if (priv->field_table != NULL)
		g_hash_table_destroy(priv->field_table);

	if (priv->entry_xml != NULL)
		g_free(priv->entry_xml);

	/* Chain up to the parent class */
	klass = GDATA_ENTRY_CLASS(g_type_class_peek(GDATA_TYPE_ENTRY));
	parent_class = G_OBJECT_CLASS (g_type_class_peek_parent (klass));
	parent_class->finalize(obj);
}
示例#4
0
static void
gdata_documents_pdf_class_init (GDataDocumentsPdfClass *klass)
{
	GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
	GDataEntryClass *entry_class = GDATA_ENTRY_CLASS (klass);

	gobject_class->constructed = gdata_documents_pdf_constructed;
	entry_class->kind_term = "http://schemas.google.com/docs/2007#pdf";
}
示例#5
0
static void gdata_entry_class_init (gpointer g_class,
		gpointer g_class_data)
{
	GObjectClass *gobject_class = G_OBJECT_CLASS(g_class);
	GDataEntryClass *klass = GDATA_ENTRY_CLASS(g_class);

	g_type_class_add_private(klass, sizeof (GDataEntryPrivate));
	gobject_class->set_property = gdata_entry_set_property;
	gobject_class->get_property = gdata_entry_get_property;
	gobject_class->dispose  = gdata_entry_dispose;
	gobject_class->finalize = gdata_entry_finalize;
}
static void
gdata_calendar_access_rule_class_init (GDataCalendarAccessRuleClass *klass)
{
	GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
	GDataEntryClass *entry_class = GDATA_ENTRY_CLASS (klass);

	parsable_class->parse_json = parse_json;
	parsable_class->post_parse_json = post_parse_json;
	parsable_class->get_json = get_json;
	parsable_class->get_content_type = get_content_type;

	entry_class->kind_term = "calendar#aclRule";
}
static void
gdata_picasaweb_comment_class_init (GDataPicasaWebCommentClass *klass)
{
	GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
	GDataEntryClass *entry_class = GDATA_ENTRY_CLASS (klass);

	gobject_class->get_property = gdata_picasaweb_comment_get_property;
	gobject_class->set_property = gdata_picasaweb_comment_set_property;

	entry_class->kind_term = "http://schemas.google.com/photos/2007#comment";

	/* Override the ETag property since ETags don't seem to be supported for PicasaWeb comments. */
	g_object_class_override_property (gobject_class, PROP_ETAG, "etag");
}
示例#8
0
static void gdata_entry_dispose (GObject *obj)
{
	GObjectClass *parent_class;
	GDataEntryClass *klass;
	GDataEntry *self = GDATA_ENTRY(obj);
	GDataEntryPrivate *priv = GDATA_ENTRY_GET_PRIVATE(self);

	if (priv->dispose_has_run) {
		/* Don't run dispose twice */
		return;
	}
	priv->dispose_has_run = TRUE;
	/* Chain up to the parent class */
	klass = GDATA_ENTRY_CLASS(g_type_class_peek(GDATA_TYPE_ENTRY));
	parent_class = G_OBJECT_CLASS (g_type_class_peek_parent (klass));
	parent_class->dispose(obj);
}