[evolution-data-server/wip/mcrha/libical-glib] Fix some of the introspection warnings



commit d5b2ed456e64b43d7be30c713486910e59b7bc59
Author: Milan Crha <mcrha redhat com>
Date:   Fri Mar 1 15:18:37 2019 +0100

    Fix some of the introspection warnings

 src/calendar/libedata-cal/CMakeLists.txt           |  6 ++--
 .../libedata-cal/e-cal-backend-intervaltree.c      |  3 +-
 src/calendar/libedata-cal/e-cal-backend-sync.c     | 42 +++++++++++-----------
 src/calendar/libedata-cal/e-cal-backend.c          | 12 ++++---
 src/calendar/libedata-cal/e-cal-cache.c            |  4 +--
 src/calendar/libedata-cal/e-cal-cache.h            |  2 +-
 src/calendar/libedata-cal/e-data-cal-view.c        | 14 ++++----
 src/calendar/libedata-cal/e-data-cal.c             | 24 ++++++-------
 src/libedataserverui/CMakeLists.txt                |  1 +
 9 files changed, 57 insertions(+), 51 deletions(-)
---
diff --git a/src/calendar/libedata-cal/CMakeLists.txt b/src/calendar/libedata-cal/CMakeLists.txt
index 9132e4dd8..18f1a32a5 100644
--- a/src/calendar/libedata-cal/CMakeLists.txt
+++ b/src/calendar/libedata-cal/CMakeLists.txt
@@ -90,7 +90,7 @@ install(FILES ${HEADERS}
 )
 
 set(gir_sources ${SOURCES} ${HEADERS})
-set(gir_identifies_prefixes EDataCal ECal)
+set(gir_identifies_prefixes EDataCal E)
 set(gir_includes GObject-2.0 Gio-2.0 Soup-2.4 libxml2-2.0 ICalGLib-3.0)
 set(gir_cflags
        -DLIBEDATA_CAL_COMPILATION
@@ -99,11 +99,13 @@ set(gir_cflags
 )
 set(gir_libdirs
        ${CMAKE_BINARY_DIR}/src/camel
+       ${CMAKE_BINARY_DIR}/src/libebackend
        ${CMAKE_BINARY_DIR}/src/libedataserver
        ${CMAKE_BINARY_DIR}/src/calendar/libecal
        ${CMAKE_BINARY_DIR}/src/calendar/libedata-cal
 )
 set(gir_libs
+       ebackend
        ecal
        edata-cal
        edataserver
@@ -118,7 +120,7 @@ gir_add_introspection_simple(
        EDataCal
        libedata-cal
        ${CAL_API_VERSION}
-       "libedata-cal/libdata-ecal.h"
+       "libedata-cal/libedata-cal.h"
        gir_identifies_prefixes
        gir_includes
        gir_cflags
diff --git a/src/calendar/libedata-cal/e-cal-backend-intervaltree.c 
b/src/calendar/libedata-cal/e-cal-backend-intervaltree.c
index 2a8355669..2a5b16fa7 100644
--- a/src/calendar/libedata-cal/e-cal-backend-intervaltree.c
+++ b/src/calendar/libedata-cal/e-cal-backend-intervaltree.c
@@ -678,7 +678,8 @@ e_intervaltree_remove (EIntervalTree *tree,
  * @start: start of the interval
  * @end: end of the interval
  * 
- * Returns: list of nodes that overlaps given interval or %NULL.
+ * Returns: (element-type ECalComponent) (nullable) (transfer full): list of #ECalComponent-s
+ *    that overlap given interval, or %NULL.
  *
  * Since: 2.32
  **/
diff --git a/src/calendar/libedata-cal/e-cal-backend-sync.c b/src/calendar/libedata-cal/e-cal-backend-sync.c
index 8a823e662..c3e4716ff 100644
--- a/src/calendar/libedata-cal/e-cal-backend-sync.c
+++ b/src/calendar/libedata-cal/e-cal-backend-sync.c
@@ -119,7 +119,7 @@ e_cal_backend_sync_refresh (ECalBackendSync *backend,
  * @uid: UID of the object to get.
  * @rid: Recurrence ID of the specific instance to get, or NULL if getting the
  * master object.
- * @calobj: Placeholder for returned object.
+ * @calobj: (out) (transfer full): Placeholder for returned object.
  * @error: Out parameter for a #GError.
  *
  * Calls the get_object_sync method on the given backend.
@@ -159,7 +159,7 @@ e_cal_backend_sync_get_object (ECalBackendSync *backend,
  * @cal: An EDataCal object.
  * @cancellable: a #GCancellable for the operation
  * @sexp: Search query.
- * @calobjs: Placeholder for list of returned objects.
+ * @calobjs: (out) (transfer full) (element-type utf8): Placeholder for list of returned objects.
  * @error: Out parameter for a #GError.
  *
  * Calls the get_object_list_sync method on the given backend.
@@ -197,10 +197,10 @@ e_cal_backend_sync_get_object_list (ECalBackendSync *backend,
  * @backend: An ECalBackendSync object.
  * @cal: An EDataCal object.
  * @cancellable: a #GCancellable for the operation
- * @users: List of users to get F/B info from.
+ * @users: (element-type utf8): List of users to get F/B info from.
  * @start: Time range start.
  * @end: Time range end.
- * @freebusyobjects: Placeholder for F/B information.
+ * @freebusyobjects: (out) (transfer full) (element-type utf8): Placeholder for F/B information.
  * @error: Out parameter for a #GError.
  *
  * Calls the get_free_busy_sync method on the given backend.
@@ -240,10 +240,10 @@ e_cal_backend_sync_get_free_busy (ECalBackendSync *backend,
  * @backend: An ECalBackendSync object.
  * @cal: An EDataCal object.
  * @cancellable: a #GCancellable for the operation
- * @calobjs: The objects to be added.
+ * @calobjs: (element-type utf8): The objects to be added.
  * @opflags: bit-or of #ECalOperationFlags
- * @uids: Placeholder for server-generated UIDs.
- * @new_components: (out) (transfer full): Placeholder for returned #ECalComponent objects.
+ * @uids: (out) (transfer full) (element-type utf8): Placeholder for server-generated UIDs.
+ * @new_components: (out) (transfer full) (element-type ECalComponent): Placeholder for returned 
#ECalComponent objects.
  * @error: Out parameter for a #GError.
  *
  * Calls the create_objects_sync method on the given backend.
@@ -285,13 +285,13 @@ e_cal_backend_sync_create_objects (ECalBackendSync *backend,
  * @backend: An ECalBackendSync object.
  * @cal: An EDataCal object.
  * @cancellable: a #GCancellable for the operation
- * @calobjs: Objects to be modified.
+ * @calobjs: (element-type utf8): Objects to be modified.
  * @mod: Type of modification to be done.
  * @opflags: bit-or of #ECalOperationFlags
- * @old_components: (out) (transfer full): Placeholder for returning the old components as they were stored 
on the
- * backend.
- * @new_components: (out) (transfer full): Placeholder for returning the new components as they have been 
stored
- * on the backend.
+ * @old_components: (out) (transfer full) (element-type ECalComponent): Placeholder for
+ *    returning the old components as they were stored on the backend.
+ * @new_components: (out) (transfer full) (element-type ECalComponent): Placeholder for
+ *    returning the new components as they have been stored on the backend.
  * @error: Out parameter for a #GError.
  *
  * Calls the modify_objects_sync method on the given backend.
@@ -334,14 +334,14 @@ e_cal_backend_sync_modify_objects (ECalBackendSync *backend,
  * @backend: An ECalBackendSync object.
  * @cal: An EDataCal object.
  * @cancellable: a #GCancellable for the operation
- * @ids: List of #ECalComponentId objects identifying the objects to remove.
+ * @ids: (element-type ECalComponentId): List of #ECalComponentId objects identifying the objects to remove.
  * @mod: Type of removal.
  * @opflags: bit-or of #ECalOperationFlags
- * @old_components: (out) (transfer full): Placeholder for returning the old components as they were stored 
on the
- * backend.
- * @new_components: (out) (transfer full): Placeholder for returning the new components as they have been 
stored
- * on the backend (when removing individual instances). If removing whole objects,
- * they will be set to %NULL.
+ * @old_components: (out) (transfer full) (element-type ECalComponent): Placeholder for returning the old
+ *    components as they were stored on the backend.
+ * @new_components: (out) (transfer full) (element-type ECalComponent): Placeholder for returning the new
+ *    components as they have been stored on the backend (when removing individual instances). If removing
+ *    whole objects, they will be set to %NULL.
  * @error: Out parameter for a #GError.
  *
  * Calls the remove_objects_sync method on the given backend.
@@ -424,8 +424,8 @@ e_cal_backend_sync_receive_objects (ECalBackendSync *backend,
  * @cancellable: a #GCancellable for the operation
  * @calobj: The iCalendar object to send.
  * @opflags: bit-or of #ECalOperationFlags
- * @users: List of users to send notifications to.
- * @modified_calobj: Placeholder for the iCalendar object after being modified.
+ * @users: (element-type utf8): List of users to send notifications to.
+ * @modified_calobj: (out) (transfer full): Placeholder for the iCalendar object after being modified.
  * @error: Out parameter for a #GError.
  *
  * Calls the send_objects_sync method on the given backend.
@@ -467,7 +467,7 @@ e_cal_backend_sync_send_objects (ECalBackendSync *backend,
  * @cancellable: a #GCancellable for the operation
  * @uid: Unique id of the calendar object.
  * @rid: Recurrence id of the calendar object.
- * @attachments: Placeholder for list of returned attachment uris.
+ * @attachments: (element-type utf8): Placeholder for list of returned attachment uris.
  * @error: Out parameter for a #GError.
  *
  * Calls the get_attachment_uris_sync method on the given backend.
diff --git a/src/calendar/libedata-cal/e-cal-backend.c b/src/calendar/libedata-cal/e-cal-backend.c
index 0235e26ca..01bda3efc 100644
--- a/src/calendar/libedata-cal/e-cal-backend.c
+++ b/src/calendar/libedata-cal/e-cal-backend.c
@@ -1119,7 +1119,7 @@ e_cal_backend_get_kind (ECalBackend *backend)
  * The returned #EDataCal is referenced for thread-safety and must be
  * unreferenced with g_object_unref() when finished with it.
  *
- * Returns: an #EDataCal, or %NULL
+ * Returns: (transfer full): an #EDataCal, or %NULL
  *
  * Since: 3.10
  **/
@@ -1146,6 +1146,8 @@ e_cal_backend_ref_data_cal (ECalBackend *backend)
  *
  * An #EDataCal should be set only once after @backend is first created.
  *
+ * The @backend adds its own reference on the @data_cal.
+ *
  * Since: 3.10
  **/
 void
@@ -1172,7 +1174,7 @@ e_cal_backend_set_data_cal (ECalBackend *backend,
  * The returned #GProxyResolver is referenced for thread-safety and must
  * be unreferenced with g_object_unref() when finished with it.
  *
- * Returns: a #GProxyResolver, or %NULL
+ * Returns: (transfer full) (nullable): a #GProxyResolver, or %NULL
  *
  * Since: 3.12
  **/
@@ -1199,7 +1201,7 @@ e_cal_backend_ref_proxy_resolver (ECalBackend *backend)
  *
  * Returns the data source registry to which #EBackend:source belongs.
  *
- * Returns: an #ESourceRegistry
+ * Returns: (transfer none): an #ESourceRegistry
  *
  * Since: 3.6
  **/
@@ -1456,7 +1458,7 @@ e_cal_backend_add_view (ECalBackend *backend,
 }
 
 /**
- * e_cal_backend_remove_view
+ * e_cal_backend_remove_view:
  * @backend: an #ECalBackend
  * @view: An #EDataCalView object, previously added with @ref e_cal_backend_add_view.
  *
@@ -4241,7 +4243,7 @@ cal_backend_add_timezone_thread (GSimpleAsyncResult *simple,
 }
 
 /**
- * e_cal_backend_add_timezone
+ * e_cal_backend_add_timezone:
  * @backend: an #ECalBackend
  * @tzobject: an iCalendar VTIMEZONE string
  * @cancellable: optional #GCancellable object, or %NULL
diff --git a/src/calendar/libedata-cal/e-cal-cache.c b/src/calendar/libedata-cal/e-cal-cache.c
index 670e20e3c..2ec1ca5c1 100644
--- a/src/calendar/libedata-cal/e-cal-cache.c
+++ b/src/calendar/libedata-cal/e-cal-cache.c
@@ -3483,8 +3483,8 @@ e_cal_cache_search_ids (ECalCache *cal_cache,
  * e_cal_cache_search_with_callback:
  * @cal_cache: an #ECalCache
  * @sexp: (nullable): search expression; use %NULL or an empty string to list all stored components
- * @func: an #ECalCacheSearchFunc callback to call for each row which satisfies @sexp
- * @user_data: user data for @func
+ * @func: (scope call): an #ECalCacheSearchFunc callback to call for each row which satisfies @sexp
+ * @user_data: (closure func): user data for @func
  * @cancellable: optional #GCancellable object, or %NULL
  * @error: return location for a #GError, or %NULL
  *
diff --git a/src/calendar/libedata-cal/e-cal-cache.h b/src/calendar/libedata-cal/e-cal-cache.h
index bf15cab08..4e3ca2668 100644
--- a/src/calendar/libedata-cal/e-cal-cache.h
+++ b/src/calendar/libedata-cal/e-cal-cache.h
@@ -217,7 +217,7 @@ gboolean    e_cal_cache_put_components      (ECalCache *cal_cache,
 gboolean       e_cal_cache_remove_component    (ECalCache *cal_cache,
                                                 const gchar *uid,
                                                 const gchar *rid,
-                                                guint32 custom_flag,
+                                                guint32 custom_flags,
                                                 ECacheOfflineFlag offline_flag,
                                                 GCancellable *cancellable,
                                                 GError **error);
diff --git a/src/calendar/libedata-cal/e-data-cal-view.c b/src/calendar/libedata-cal/e-data-cal-view.c
index 5888e74c1..0cb1bcb36 100644
--- a/src/calendar/libedata-cal/e-data-cal-view.c
+++ b/src/calendar/libedata-cal/e-data-cal-view.c
@@ -600,7 +600,7 @@ e_data_cal_view_init (EDataCalView *view)
  * @connection at @object_path.  If an error occurs while exporting,
  * the function sets @error and returns %NULL.
  *
- * Returns: an #EDataCalView
+ * Returns: (transfer full) (nullable): a new #EDataCalView, or %NULL on error
  **/
 EDataCalView *
 e_data_cal_view_new (ECalBackend *backend,
@@ -809,7 +809,7 @@ notify_remove (EDataCalView *view,
  *
  * Gets the backend that @view is querying.
  *
- * Returns: The associated #ECalBackend.
+ * Returns: (transfer none): The associated #ECalBackend.
  *
  * Since: 3.8
  **/
@@ -828,7 +828,7 @@ e_data_cal_view_get_backend (EDataCalView *view)
  * Returns the #GDBusConnection on which the CalendarView D-Bus
  * interface is exported.
  *
- * Returns: the #GDBusConnection
+ * Returns: (transfer none): the #GDBusConnection
  *
  * Since: 3.8
  **/
@@ -865,7 +865,7 @@ e_data_cal_view_get_object_path (EDataCalView *view)
  *
  * Get the #ECalBackendSExp object used for the given view.
  *
- * Returns: The expression object used to search.
+ * Returns: (transfer none): The expression object used to search.
  *
  * Since: 3.8
  */
@@ -992,7 +992,7 @@ e_data_cal_view_is_completed (EDataCalView *view)
  * e_data_cal_view_get_fields_of_interest:
  * @view: an #EDataCalView
  *
- * Returns: Hash table of field names which the listener is interested in.
+ * Returns: (transfer none): Hash table of field names which the listener is interested in.
  * Backends can return fully populated objects, but the listener advertised
  * that it will use only these. Returns %NULL for all available fields.
  *
@@ -1215,7 +1215,7 @@ e_data_cal_view_notify_components_added_1 (EDataCalView *view,
 /**
  * e_data_cal_view_notify_components_modified:
  * @view: an #EDataCalView
- * @ecalcomponents: List of modified #ECalComponent-s.
+ * @ecalcomponents: (element-type ECalComponent): List of modified #ECalComponent-s.
  *
  * Notifies all view listeners of the modification of a list of components.
  *
@@ -1276,7 +1276,7 @@ e_data_cal_view_notify_components_modified_1 (EDataCalView *view,
 /**
  * e_data_cal_view_notify_objects_removed:
  * @view: an #EDataCalView
- * @ids: List of IDs for the objects that have been removed.
+ * @ids: (element-type ECalComponentId): List of IDs for the objects that have been removed.
  *
  * Notifies all view listener of the removal of a list of objects.
  */
diff --git a/src/calendar/libedata-cal/e-data-cal.c b/src/calendar/libedata-cal/e-data-cal.c
index 8963e02cf..e7e13acb2 100644
--- a/src/calendar/libedata-cal/e-data-cal.c
+++ b/src/calendar/libedata-cal/e-data-cal.c
@@ -1755,7 +1755,7 @@ e_data_cal_respond_get_object (EDataCal *cal,
  * @cal: A calendar client interface.
  * @opid: associated operation id
  * @error: Operation error, if any, automatically freed if passed it.
- * @objects: List of retrieved objects.
+ * @objects: (element-type utf8): List of retrieved objects.
  *
  * Notifies listeners of the completion of the get_object_list method call.
  *
@@ -1810,7 +1810,7 @@ e_data_cal_respond_get_object_list (EDataCal *cal,
  * @cal: A calendar client interface.
  * @opid: associated operation id
  * @error: Operation error, if any, automatically freed if passed it.
- * @freebusy: a #GSList of iCalendar strings with all gathered free/busy components.
+ * @freebusy: (element-type utf8): a #GSList of iCalendar strings with all gathered free/busy components.
  *
  * Notifies listeners of the completion of the get_free_busy method call.
  * To pass actual free/busy objects to the client asynchronously
@@ -1862,8 +1862,8 @@ e_data_cal_respond_get_free_busy (EDataCal *cal,
  * @cal: A calendar client interface.
  * @opid: associated operation id
  * @error: Operation error, if any, automatically freed if passed it.
- * @uids: UIDs of the objects created.
- * @new_components: The newly created #ECalComponent objects.
+ * @uids: (element-type utf8): UIDs of the objects created.
+ * @new_components: (element-type ECalComponent): The newly created #ECalComponent objects.
  *
  * Notifies listeners of the completion of the create_objects method call.
  *
@@ -1931,8 +1931,8 @@ e_data_cal_respond_create_objects (EDataCal *cal,
  * @cal: A calendar client interface.
  * @opid: associated operation id
  * @error: Operation error, if any, automatically freed if passed it.
- * @old_components: The old #ECalComponent(s).
- * @new_components: The new #ECalComponent(s).
+ * @old_components: (element-type ECalComponent): The old #ECalComponent(s).
+ * @new_components: (element-type ECalComponent): The new #ECalComponent(s).
  *
  * Notifies listeners of the completion of the modify_objects method call.
  *
@@ -2007,7 +2007,7 @@ e_data_cal_respond_modify_objects (EDataCal *cal,
  * @cal: A calendar client interface.
  * @opid: associated operation id
  * @error: Operation error, if any, automatically freed if passed it.
- * @ids: (element-type utf8): IDs of the removed objects.
+ * @ids: (element-type ECalComponentId): IDs of the removed objects.
  * @old_components: (element-type ECalComponent): The old #ECalComponent(s).
  * @new_components: (element-type ECalComponent): The new #ECalComponent(s).
  *    They will not be NULL only when removing instances of recurring appointments.
@@ -2141,7 +2141,7 @@ e_data_cal_respond_receive_objects (EDataCal *cal,
  * @cal: A calendar client interface.
  * @opid: associated operation id
  * @error: Operation error, if any, automatically freed if passed it.
- * @users: List of users.
+ * @users: (element-type utf8): List of users.
  * @calobj: An iCalendar string representing the object sent.
  *
  * Notifies listeners of the completion of the send_objects method call.
@@ -2196,7 +2196,7 @@ e_data_cal_respond_send_objects (EDataCal *cal,
  * @cal: A calendar client interface.
  * @opid: associated operation id
  * @error: Operation error, if any, automatically freed if passed it.
- * @attachment_uris: List of retrieved attachment uri's.
+ * @attachment_uris: (element-type utf8): List of retrieved attachment uri's.
  *
  * Notifies listeners of the completion of the get_attachment_uris method call.
  *
@@ -2817,7 +2817,7 @@ e_data_cal_init (EDataCal *data_cal)
 
 /**
  * e_data_cal_new:
- * @backend: an #ECalBackend
+ * @backend: (type ECalBackend): an #ECalBackend
  * @connection: a #GDBusConnection
  * @object_path: object path for the D-Bus interface
  * @error: return location for a #GError, or %NULL
@@ -2857,7 +2857,7 @@ e_data_cal_new (ECalBackend *backend,
  * The returned #ECalBackend is referenced for thread-safety and should
  * be unreferenced with g_object_unref() when finished with it.
  *
- * Returns: an #ECalBackend
+ * Returns: (type ECalBackend) (transfer full) (nullable): an #ECalBackend
  *
  * Since: 3.10
  **/
@@ -2876,7 +2876,7 @@ e_data_cal_ref_backend (EDataCal *cal)
  * Returns the #GDBusConnection on which the Calendar D-Bus interface
  * is exported.
  *
- * Returns: the #GDBusConnection
+ * Returns: (transfer none): the #GDBusConnection
  *
  * Since: 3.8
  **/
diff --git a/src/libedataserverui/CMakeLists.txt b/src/libedataserverui/CMakeLists.txt
index eebb7ec11..d7a026e38 100644
--- a/src/libedataserverui/CMakeLists.txt
+++ b/src/libedataserverui/CMakeLists.txt
@@ -128,6 +128,7 @@ set(gir_libs
 set(gir_deps
        ${CMAKE_BINARY_DIR}/src/camel/Camel-${API_VERSION}.gir
        ${CMAKE_BINARY_DIR}/src/libedataserver/EDataServer-${API_VERSION}.gir
+       ${CMAKE_BINARY_DIR}/src/calendar/libecal/ECal-${CAL_API_VERSION}.gir
 )
 
 gir_add_introspection_simple(


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