[evolution-data-server] Bug 776254 - Introspection for libedataserverui



commit 00ab8d4b3a08173e4deec12771f2bb764b400c43
Author: Corentin Noël <corentin elementary io>
Date:   Mon Dec 19 18:56:20 2016 +0100

    Bug 776254 - Introspection for libedataserverui

 src/libedataserverui/CMakeLists.txt                |   35 ++++++++++++++++++++
 src/libedataserverui/e-credentials-prompter-impl.c |    4 +-
 src/libedataserverui/e-credentials-prompter.c      |    7 +++-
 src/libedataserverui/e-trust-prompt.c              |    2 +-
 src/libedataserverui/e-trust-prompt.h              |    2 +-
 src/libedataserverui/e-webdav-discover-widget.c    |    2 +-
 src/vala/CMakeLists.txt                            |   32 ++++++++++++++++++
 src/vala/libedataserverui-1.2.deps                 |    2 +
 8 files changed, 80 insertions(+), 6 deletions(-)
---
diff --git a/src/libedataserverui/CMakeLists.txt b/src/libedataserverui/CMakeLists.txt
index af4b28e..599a035 100644
--- a/src/libedataserverui/CMakeLists.txt
+++ b/src/libedataserverui/CMakeLists.txt
@@ -95,3 +95,38 @@ install(TARGETS edataserverui
 install(FILES ${HEADERS}
        DESTINATION ${privincludedir}/libedataserverui
 )
+
+set(gir_sources ${SOURCES} ${HEADERS})
+set(gir_identifies_prefixes E)
+set(gir_includes GObject-2.0 Gio-2.0 Gtk-3.0 Soup-2.4)
+set(gir_cflags
+       -DLIBEDATASERVERUI_COMPILATION
+)
+set(gir_libdirs
+       ${CMAKE_BINARY_DIR}/src/private
+       ${CMAKE_BINARY_DIR}/src/camel
+       ${CMAKE_BINARY_DIR}/src/libedataserver
+)
+set(gir_libs
+       camel
+       edataserver
+       edataserverui
+)
+set(gir_deps
+       ${CMAKE_BINARY_DIR}/src/camel/Camel-${API_VERSION}.gir
+       ${CMAKE_BINARY_DIR}/src/libedataserver/EDataServer-${API_VERSION}.gir
+)
+
+gir_add_introspection_simple(
+       EDataServerUI
+       libedataserverui
+       ${API_VERSION}
+       "libedataserverui/libedataserverui.h"
+       gir_identifies_prefixes
+       gir_includes
+       gir_cflags
+       gir_libdirs
+       gir_libs
+       gir_deps
+       gir_sources
+)
diff --git a/src/libedataserverui/e-credentials-prompter-impl.c 
b/src/libedataserverui/e-credentials-prompter-impl.c
index 3ca2404..c88d0a7 100644
--- a/src/libedataserverui/e-credentials-prompter-impl.c
+++ b/src/libedataserverui/e-credentials-prompter-impl.c
@@ -99,7 +99,7 @@ e_credentials_prompter_impl_class_init (ECredentialsPrompterImplClass *klass)
                G_SIGNAL_RUN_LAST,
                G_STRUCT_OFFSET (ECredentialsPrompterImplClass, prompt_finished),
                NULL, NULL, NULL,
-               G_TYPE_NONE, 2, G_TYPE_POINTER, G_TYPE_POINTER);
+               G_TYPE_NONE, 2, G_TYPE_POINTER, E_TYPE_NAMED_PARAMETERS);
 }
 
 static void
@@ -117,7 +117,7 @@ e_credentials_prompter_impl_init (ECredentialsPrompterImpl *prompter_impl)
  *
  * Returns an #ECredentialsPrompter with which the @prompter_impl is associated.
  *
- * Returns: an #ECredentialsPrompter
+ * Returns: (transfer none): an #ECredentialsPrompter
  *
  * Since: 3.16
  **/
diff --git a/src/libedataserverui/e-credentials-prompter.c b/src/libedataserverui/e-credentials-prompter.c
index fe51c59..a848c0c 100644
--- a/src/libedataserverui/e-credentials-prompter.c
+++ b/src/libedataserverui/e-credentials-prompter.c
@@ -1029,6 +1029,9 @@ e_credentials_prompter_class_init (ECredentialsPrompterClass *class)
         * window for it. If the result of the call is %NULL, then it tries
         * to get the window from the default GtkApplication.
         *
+        * Returns: (transfer none): a #GtkWindow, to be used as a dialog parent,
+        * or %NULL.
+        *
         * Since: 3.16
         **/
        signals[GET_DIALOG_PARENT] = g_signal_new (
@@ -1170,6 +1173,7 @@ e_credentials_prompter_set_auto_prompt (ECredentialsPrompter *prompter,
 }
 
 /**
+ * e_credentials_prompter_set_auto_prompt_disabled_for:
  * @prompter: an #ECredentialsPrompter
  * @source: an #ESource
  * @is_disabled: whether the auto-prompt should be disabled for this @source
@@ -1202,6 +1206,7 @@ e_credentials_prompter_set_auto_prompt_disabled_for (ECredentialsPrompter *promp
 }
 
 /**
+ * e_credentials_prompter_get_auto_prompt_disabled_for:
  * @prompter: an #ECredentialsPrompter
  * @source: an #ESource
  *
@@ -1703,7 +1708,7 @@ credentials_prompter_prompt_sync (ECredentialsPrompter *prompter,
  * @prompter: an #ECredentialsPrompter
  * @source: an #ESource to be prompted credentials for
  * @flags: a bit-or of #ECredentialsPrompterPromptFlags initial flags
- * @func: an #ECredentialsPrompterLoopPromptFunc user function to call to check provided credentials
+ * @func: (scope call): an #ECredentialsPrompterLoopPromptFunc user function to call to check provided 
credentials
  * @user_data: user data to pass to @func
  * @cancellable: (allow-none): an optional #GCancellable, or %NULL
  * @error: (allow-none): a #GError, to store any errors to, or %NULL
diff --git a/src/libedataserverui/e-trust-prompt.c b/src/libedataserverui/e-trust-prompt.c
index 2c211ec..50d7634 100644
--- a/src/libedataserverui/e-trust-prompt.c
+++ b/src/libedataserverui/e-trust-prompt.c
@@ -257,7 +257,7 @@ trust_prompt_show (GtkWindow *parent,
  * bit description per line. If no bit is set, then an empty string is
  * returned.
  *
- * Returns: (transfer-full): A newly allocated string with text description
+ * Returns: A newly allocated string with text description
  *  of @flags. Free the returned pointer with g_free() when no longer needed.
  *
  * Since: 3.16
diff --git a/src/libedataserverui/e-trust-prompt.h b/src/libedataserverui/e-trust-prompt.h
index 27b9835..7f289cb 100644
--- a/src/libedataserverui/e-trust-prompt.h
+++ b/src/libedataserverui/e-trust-prompt.h
@@ -30,7 +30,7 @@
 #include <libedataserver/libedataserver.h>
 
 gchar *                e_trust_prompt_describe_certificate_errors
-                                       (GTlsCertificateFlags certificate_errors);
+                                       (GTlsCertificateFlags flags);
 ETrustPromptResponse
                e_trust_prompt_run_modal(GtkWindow *parent,
                                         const gchar *source_extension,
diff --git a/src/libedataserverui/e-webdav-discover-widget.c b/src/libedataserverui/e-webdav-discover-widget.c
index 7e63c81..d1ad68c 100644
--- a/src/libedataserverui/e-webdav-discover-widget.c
+++ b/src/libedataserverui/e-webdav-discover-widget.c
@@ -333,7 +333,7 @@ e_webdav_discover_content_get_base_url (GtkWidget *content)
 }
 
 /**
- * e_webdav_discover_content_get_base_url:
+ * e_webdav_discover_content_get_selected:
  * @content: a WebDAV discovery content, created by e_webdav_discover_content_new()
  * @index: an index of the selected source; counts from 0
  * @out_href: (out): an output location for the URL of the selected source
diff --git a/src/vala/CMakeLists.txt b/src/vala/CMakeLists.txt
index dd2d371..06a2312 100644
--- a/src/vala/CMakeLists.txt
+++ b/src/vala/CMakeLists.txt
@@ -5,6 +5,8 @@ set(valafiles
        ${CMAKE_CURRENT_BINARY_DIR}/libebook-${API_VERSION}.vapi
        ${CMAKE_CURRENT_SOURCE_DIR}/libebook-contacts-${API_VERSION}.deps
        ${CMAKE_CURRENT_BINARY_DIR}/libebook-contacts-${API_VERSION}.vapi
+       ${CMAKE_CURRENT_SOURCE_DIR}/libedataserverui-${API_VERSION}.deps
+       ${CMAKE_CURRENT_BINARY_DIR}/libedataserverui-${API_VERSION}.vapi
 )
 
 add_custom_target(vala ALL)
@@ -67,6 +69,36 @@ add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/libedataserver-${API_VERSI
 )
 
 # ***********************************
+# libedataserverui
+# ***********************************
+
+set(gir_fullname ${CMAKE_BINARY_DIR}/src/libedataserverui/EDataServerUI-${API_VERSION}.gir)
+gir_girfilename_to_target(gir_deps EDataServerUI-${API_VERSION}.gir)
+
+add_dependencies(vala ${gir_deps})
+
+add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/libedataserverui-${API_VERSION}.vapi
+       COMMAND ${VAPIGEN}
+               --vapidir=${CMAKE_CURRENT_SOURCE_DIR}
+               --vapidir=${CMAKE_CURRENT_BINARY_DIR}
+               --girdir=${CMAKE_BINARY_DIR}/src/camel
+               --girdir=${CMAKE_BINARY_DIR}/src/libedataserver
+               --pkg libedataserver-${API_VERSION}
+               --pkg gio-2.0
+               --pkg gtk+-3.0
+               --pkg libxml-2.0
+               --pkg libsoup-2.4
+               --pkg posix
+               --library libedataserverui-${API_VERSION}
+               --metadatadir=${CMAKE_CURRENT_SOURCE_DIR}
+               ${gir_fullname}
+       DEPENDS libedataserverui-${API_VERSION}.deps
+               ${CMAKE_CURRENT_BINARY_DIR}/libedataserver-${API_VERSION}.vapi
+               ${gir_fullname}
+               ${gir_deps}
+)
+
+# ***********************************
 # libebook-contacts
 # ***********************************
 
diff --git a/src/vala/libedataserverui-1.2.deps b/src/vala/libedataserverui-1.2.deps
new file mode 100644
index 0000000..bc54ec3
--- /dev/null
+++ b/src/vala/libedataserverui-1.2.deps
@@ -0,0 +1,2 @@
+libedataserver-1.2
+gtk+-3.0


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