Commit cb7bfcb8 authored by David Zeuthen's avatar David Zeuthen
Browse files

Add missing GObject Introspection annotations


Signed-off-by: default avatarDavid Zeuthen <davidz@redhat.com>
parent 5cdeafcb
......@@ -100,6 +100,7 @@ typelibs_DATA = Polkit-1.0.typelib
Polkit-1.0.gir: libpolkit-gobject-1.la $(G_IR_SCANNER) Makefile.am
$(G_IR_SCANNER) -v \
--warn-all \
--namespace Polkit \
--nsversion=1.0 \
--include=Gio-2.0 \
......@@ -111,25 +112,7 @@ Polkit-1.0.gir: libpolkit-gobject-1.la $(G_IR_SCANNER) Makefile.am
--libtool=$(top_builddir)/libtool \
-I$(top_srcdir)/src \
-D_POLKIT_COMPILATION \
$(srcdir)/polkit.h \
$(srcdir)/polkittypes.h \
$(srcdir)/polkitactiondescription.h \
$(srcdir)/polkitauthority.h \
$(srcdir)/polkitauthorizationresult.h \
$(srcdir)/polkitcheckauthorizationflags.h \
$(srcdir)/polkitdetails.h \
$(builddir)/polkitenumtypes.h \
$(srcdir)/polkiterror.h \
$(srcdir)/polkitidentity.h \
$(srcdir)/polkitimplicitauthorization.h \
$(srcdir)/polkitsubject.h \
$(srcdir)/polkitsystembusname.h \
$(srcdir)/polkittemporaryauthorization.h \
$(srcdir)/polkitunixgroup.h \
$(srcdir)/polkitunixprocess.h \
$(srcdir)/polkitunixsession.h \
$(srcdir)/polkitunixuser.h \
$(srcdir)/polkitpermission.h \
$(libpolkit_gobject_1_la_SOURCES) \
$(NULL)
Polkit-1.0.typelib: Polkit-1.0.gir $(G_IR_COMPILER)
......
......@@ -265,7 +265,7 @@ polkit_action_description_get_annotation (PolkitActionDescription *action_descri
*
* Gets the keys of annotations defined in @action_description.
*
* Returns: The annotation keys owned by @action_description. Do not free.
* Returns: (transfer none): The annotation keys owned by @action_description. Do not free.
*/
const gchar * const *
polkit_action_description_get_annotation_keys (PolkitActionDescription *action_description)
......
......@@ -370,6 +370,14 @@ async_initable_iface_init (GAsyncInitableIface *async_initable_iface)
/* ---------------------------------------------------------------------------------------------------- */
/* deprecated, see polkitauthority.h */
/**
* polkit_authority_get:
*
* (deprecated)
*
* Returns: (transfer full): value
*/
PolkitAuthority *
polkit_authority_get (void)
{
......@@ -498,8 +506,8 @@ polkit_authority_get_async (GCancellable *cancellable,
*
* Finishes an operation started with polkit_authority_get_async().
*
* Returns: A #PolkitAuthority. Free it with g_object_unref() when
* done with it.
* Returns: (transfer full): A #PolkitAuthority. Free it with
* g_object_unref() when done with it.
*/
PolkitAuthority *
polkit_authority_get_finish (GAsyncResult *res,
......@@ -540,8 +548,8 @@ polkit_authority_get_finish (GAsyncResult *res,
* blocked until a reply is received. See polkit_authority_get_async()
* for the asynchronous version.
*
* Returns: A #PolkitAuthority. Free it with g_object_unref() when
* done with it.
* Returns: (transfer full): A #PolkitAuthority. Free it with
* g_object_unref() when done with it.
*/
PolkitAuthority *
polkit_authority_get_sync (GCancellable *cancellable,
......@@ -672,8 +680,10 @@ polkit_authority_enumerate_actions (PolkitAuthority *authority,
*
* Finishes retrieving all registered actions.
*
* Returns: A list of #PolkitActionDescription objects or %NULL if @error is set. The returned list
* should be freed with g_list_free() after each element have been freed with g_object_unref().
* Returns: (transfer full): A list of #PolkitActionDescription
* objects or %NULL if @error is set. The returned list should be
* freed with g_list_free() after each element have been freed with
* g_object_unref().
**/
GList *
polkit_authority_enumerate_actions_finish (PolkitAuthority *authority,
......@@ -726,8 +736,10 @@ polkit_authority_enumerate_actions_finish (PolkitAuthority *authority,
* is blocked until a reply is received. See
* polkit_authority_enumerate_actions() for the asynchronous version.
*
* Returns: A list of #PolkitActionDescription or %NULL if @error is set. The returned list
* should be freed with g_list_free() after each element have been freed with g_object_unref().
* Returns: (transfer full): A list of #PolkitActionDescription or
* %NULL if @error is set. The returned list should be freed with
* g_list_free() after each element have been freed with
* g_object_unref().
**/
GList *
polkit_authority_enumerate_actions_sync (PolkitAuthority *authority,
......@@ -919,7 +931,8 @@ polkit_authority_check_authorization (PolkitAuthority *authority,
*
* Finishes checking if a subject is authorized for an action.
*
* Returns: A #PolkitAuthorizationResult or %NULL if @error is set. Free with g_object_unref().
* Returns: (transfer full): A #PolkitAuthorizationResult or %NULL if
* @error is set. Free with g_object_unref().
**/
PolkitAuthorizationResult *
polkit_authority_check_authorization_finish (PolkitAuthority *authority,
......@@ -972,7 +985,7 @@ polkit_authority_check_authorization_finish (PolkitAuthority *authority
* operation to complete because it involves waiting for the user to
* authenticate.
*
* Returns: A #PolkitAuthorizationResult or %NULL if @error is set. Free with g_object_unref().
* Returns: (transfer full): A #PolkitAuthorizationResult or %NULL if @error is set. Free with g_object_unref().
*/
PolkitAuthorizationResult *
polkit_authority_check_authorization_sync (PolkitAuthority *authority,
......@@ -1469,8 +1482,10 @@ polkit_authority_enumerate_temporary_authorizations (PolkitAuthority *author
*
* Finishes retrieving all registered actions.
*
* Returns: A list of #PolkitTemporaryAuthorization objects or %NULL if @error is set. The returned list
* should be freed with g_list_free() after each element have been freed with g_object_unref().
* Returns: (transfer full): A list of #PolkitTemporaryAuthorization
* objects or %NULL if @error is set. The returned list should be
* freed with g_list_free() after each element have been freed with
* g_object_unref().
**/
GList *
polkit_authority_enumerate_temporary_authorizations_finish (PolkitAuthority *authority,
......@@ -1534,8 +1549,10 @@ polkit_authority_enumerate_temporary_authorizations_finish (PolkitAuthority *aut
* polkit_authority_enumerate_temporary_authorizations() for the
* asynchronous version.
*
* Returns: A list of #PolkitTemporaryAuthorization objects or %NULL if @error is set. The returned list
* should be freed with g_list_free() after each element have been freed with g_object_unref().
* Returns: (transfer full): A list of #PolkitTemporaryAuthorization
* objects or %NULL if @error is set. The returned list should be
* freed with g_list_free() after each element have been freed with
* g_object_unref().
**/
GList *
polkit_authority_enumerate_temporary_authorizations_sync (PolkitAuthority *authority,
......
......@@ -68,14 +68,6 @@ GList *polkit_authority_enumerate_actions_sync (PolkitAuthor
GCancellable *cancellable,
GError **error);
GList *polkit_authority_enumerate_users_sync (PolkitAuthority *authority,
GCancellable *cancellable,
GError **error);
GList *polkit_authority_enumerate_groups_sync (PolkitAuthority *authority,
GCancellable *cancellable,
GError **error);
PolkitAuthorizationResult *polkit_authority_check_authorization_sync (PolkitAuthority *authority,
PolkitSubject *subject,
const gchar *action_id,
......
......@@ -164,8 +164,9 @@ polkit_details_insert (PolkitDetails *details,
*
* Gets a list of all keys on @details.
*
* Returns: (allow-none): %NULL if there are no keys otherwise an
* array of strings that should be freed with g_strfreev().
* Returns: (transfer full) (allow-none): %NULL if there are no keys
* otherwise an array of strings that should be freed with
* g_strfreev().
*/
gchar **
polkit_details_get_keys (PolkitDetails *details)
......
......@@ -137,8 +137,8 @@ polkit_identity_to_string (PolkitIdentity *identity)
* Creates an object from @str that implements the #PolkitIdentity
* interface.
*
* Returns: (allow-none): A #PolkitIdentity or %NULL if @error is
* set. Free with g_object_unref().
* Returns: (allow-none) (transfer full): A #PolkitIdentity or %NULL
* if @error is set. Free with g_object_unref().
*/
PolkitIdentity *
polkit_identity_from_string (const gchar *str,
......
......@@ -218,8 +218,8 @@ polkit_subject_exists_sync (PolkitSubject *subject,
* Creates an object from @str that implements the #PolkitSubject
* interface.
*
* Returns: A #PolkitSubject or %NULL if @error is set. Free with
* g_object_unref().
* Returns: (transfer full): A #PolkitSubject or %NULL if @error is
* set. Free with g_object_unref().
*/
PolkitSubject *
polkit_subject_from_string (const gchar *str,
......
......@@ -190,7 +190,7 @@ polkit_system_bus_name_set_name (PolkitSystemBusName *system_bus_name,
*
* Creates a new #PolkitSystemBusName for @name.
*
* Returns: A #PolkitSystemBusName. Free with g_object_unref().
* Returns: (transfer full): A #PolkitSystemBusName. Free with g_object_unref().
*/
PolkitSubject *
polkit_system_bus_name_new (const gchar *name)
......@@ -349,7 +349,7 @@ subject_iface_init (PolkitSubjectIface *subject_iface)
* Synchronously gets a #PolkitUnixProcess object for @system_bus_name
* - the calling thread is blocked until a reply is received.
*
* Returns: (allow-none): A #PolkitUnixProcess object or %NULL if @error is set.
* Returns: (allow-none) (transfer full): A #PolkitUnixProcess object or %NULL if @error is set.
**/
PolkitSubject *
polkit_system_bus_name_get_process_sync (PolkitSystemBusName *system_bus_name,
......
......@@ -178,7 +178,7 @@ polkit_unix_group_set_gid (PolkitUnixGroup *group,
*
* Creates a new #PolkitUnixGroup object for @gid.
*
* Returns: A #PolkitUnixGroup object. Free with g_object_unref().
* Returns: (transfer full): A #PolkitUnixGroup object. Free with g_object_unref().
*/
PolkitIdentity *
polkit_unix_group_new (gint gid)
......@@ -196,7 +196,7 @@ polkit_unix_group_new (gint gid)
* Creates a new #PolkitUnixGroup object for a group with the group name
* @name.
*
* Returns: (allow-none): A #PolkitUnixGroup object or %NULL if @error
* Returns: (transfer full): (allow-none): A #PolkitUnixGroup object or %NULL if @error
* is set.
*/
PolkitIdentity *
......
......@@ -302,7 +302,7 @@ polkit_unix_process_set_pid (PolkitUnixProcess *process,
* <filename>/proc</filename> filesystem depending on the platform in
* use.
*
* Returns: A #PolkitSubject. Free with g_object_unref().
* Returns: (transfer full): A #PolkitSubject. Free with g_object_unref().
*/
PolkitSubject *
polkit_unix_process_new (gint pid)
......@@ -319,7 +319,7 @@ polkit_unix_process_new (gint pid)
*
* Creates a new #PolkitUnixProcess object for @pid and @start_time.
*
* Returns: A #PolkitSubject. Free with g_object_unref().
* Returns: (transfer full): A #PolkitSubject. Free with g_object_unref().
*/
PolkitSubject *
polkit_unix_process_new_full (gint pid,
......
......@@ -222,7 +222,7 @@ polkit_unix_session_set_session_id (PolkitUnixSession *session,
*
* Creates a new #PolkitUnixSession for @session_id.
*
* Returns: A #PolkitUnixSession. Free with g_object_unref().
* Returns: (transfer full): A #PolkitUnixSession. Free with g_object_unref().
**/
PolkitSubject *
polkit_unix_session_new (const gchar *session_id)
......@@ -274,7 +274,7 @@ polkit_unix_session_new_for_process (gint pid,
*
* Finishes constructing a #PolkitSubject for a process id.
*
* Returns: (allow-none): A #PolkitUnixSession for the @pid passed to
* Returns: (transfer full) (allow-none): A #PolkitUnixSession for the @pid passed to
* polkit_unix_session_new_for_process() or %NULL if @error is
* set. Free with g_object_unref().
**/
......@@ -312,8 +312,8 @@ polkit_unix_session_new_for_process_finish (GAsyncResult *res,
* reply is received. For the asynchronous version, see
* polkit_unix_session_new_for_process().
*
* Returns: (allow-none): A #PolkitUnixSession for @pid or %NULL if
* @error is set. Free with g_object_unref().
* Returns: (allow-none) (transfer full): A #PolkitUnixSession for
* @pid or %NULL if @error is set. Free with g_object_unref().
**/
PolkitSubject *
polkit_unix_session_new_for_process_sync (gint pid,
......
......@@ -178,7 +178,7 @@ polkit_unix_user_set_uid (PolkitUnixUser *user,
*
* Creates a new #PolkitUnixUser object for @uid.
*
* Returns: A #PolkitUnixUser object. Free with g_object_unref().
* Returns: (transfer full): A #PolkitUnixUser object. Free with g_object_unref().
*/
PolkitIdentity *
polkit_unix_user_new (gint uid)
......@@ -196,7 +196,7 @@ polkit_unix_user_new (gint uid)
* Creates a new #PolkitUnixUser object for a user with the user name
* @name.
*
* Returns: (allow-none): A #PolkitUnixUser object or %NULL if @error is set.
* Returns: (allow-none) (transfer full): A #PolkitUnixUser object or %NULL if @error is set.
*/
PolkitIdentity *
polkit_unix_user_new_for_name (const gchar *name,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment