[evolution-data-server/openismus-work] ebook: make EContactCert usable in Vala
- From: Patrick Ohly <pohly src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/openismus-work] ebook: make EContactCert usable in Vala
- Date: Mon, 18 Feb 2013 10:15:59 +0000 (UTC)
commit 89ec81b551583bb784131b7459711169020dc3fa
Author: Patrick Ohly <patrick ohly intel com>
Date: Thu Feb 14 18:01:19 2013 +0100
ebook: make EContactCert usable in Vala
"new E.ContactCert()" in Vala fails because the struct has no
constructor. Introducing e_contact_cert_new() fixes that problem.
This extends the API instead of changing it. It is still valid
to allocated EContactCert instances via some other means.
addressbook/libebook-contacts/e-contact.c | 17 +++++++++++++++++
addressbook/libebook-contacts/e-contact.h | 1 +
2 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/addressbook/libebook-contacts/e-contact.c b/addressbook/libebook-contacts/e-contact.c
index 47a7497..8f371d6 100644
--- a/addressbook/libebook-contacts/e-contact.c
+++ b/addressbook/libebook-contacts/e-contact.c
@@ -2581,6 +2581,23 @@ e_contact_address_copy (EContactAddress *address)
E_CONTACT_DEFINE_BOXED_TYPE (e_contact_address, "EContactAddress")
/**
+ * e_contact_cert_new:
+ *
+ * Creates an #EContactCert struct with all values set to 0.
+ *
+ * Returns: (transfer full): A new #EContactCert struct.
+ *
+ * Since: 3.7
+ **/
+EContactCert *
+e_contact_cert_new ()
+{
+ EContactCert *cert;
+ cert = g_new0 (EContactCert, 1);
+ return cert;
+}
+
+/**
* e_contact_cert_free:
* @cert: an #EContactCert
*
diff --git a/addressbook/libebook-contacts/e-contact.h b/addressbook/libebook-contacts/e-contact.h
index 3dc744c..36991ad 100644
--- a/addressbook/libebook-contacts/e-contact.h
+++ b/addressbook/libebook-contacts/e-contact.h
@@ -363,6 +363,7 @@ EContactGeo * e_contact_geo_new (void);
GType e_contact_geo_get_type (void);
void e_contact_geo_free (EContactGeo *geo);
+EContactCert * e_contact_cert_new (void);
GType e_contact_cert_get_type (void);
void e_contact_cert_free (EContactCert *cert);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]