From: Alberto Mardegan Date: Fri, 30 Nov 2012 07:37:07 +0000 (+0200) Subject: Effectively deprecate signon_auth_session_process X-Git-Tag: 1.8~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a91ae4686fb68a599554b98d70dbe28ac57e2663;p=platform%2Fupstream%2Flibgsignon-glib.git Effectively deprecate signon_auth_session_process --- diff --git a/docs/reference/Makefile.am b/docs/reference/Makefile.am index 1e2490c..ee9ca13 100644 --- a/docs/reference/Makefile.am +++ b/docs/reference/Makefile.am @@ -25,7 +25,7 @@ SCANGOBJ_OPTIONS= # Extra options to supply to gtkdoc-scan. # e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED" -SCAN_OPTIONS=--rebuild-types +SCAN_OPTIONS=--rebuild-types --deprecated-guards="SIGNON_DISABLE_DEPRECATED" # Extra options to supply to gtkdoc-mkdb. # e.g. MKDB_OPTIONS=--sgml-mode --output-format=xml diff --git a/docs/reference/libsignon-glib-sections.txt b/docs/reference/libsignon-glib-sections.txt index dfe5401..2807dbb 100644 --- a/docs/reference/libsignon-glib-sections.txt +++ b/docs/reference/libsignon-glib-sections.txt @@ -46,6 +46,10 @@ signon_auth_session_query_available_mechanisms SignonAuthSessionClass SignonAuthSessionPrivate +SIGNON_DEPRECATED +SIGNON_DEPRECATED_FOR +G_DEPRECATED +G_DEPRECATED_FOR SIGNON_AUTH_SESSION SIGNON_AUTH_SESSION_CLASS diff --git a/libsignon-glib/Makefile.am b/libsignon-glib/Makefile.am index ec49da1..e208101 100644 --- a/libsignon-glib/Makefile.am +++ b/libsignon-glib/Makefile.am @@ -53,6 +53,7 @@ libsignon_glib_la_SOURCES = \ signon-errors.c \ signon-utils.h \ signon-utils.c \ + signon-types.h \ sso-auth-service.c \ sso-auth-service.h @@ -65,6 +66,7 @@ libsignon_glib_include_HEADERS = \ signon-errors.h \ signon-enum-types.h \ signon-glib.h \ + signon-types.h \ $(signon_headers) # Headers with enums to be parsed with glib-mkenums; diff --git a/libsignon-glib/signon-auth-session.h b/libsignon-glib/signon-auth-session.h index caccce3..18bbcb3 100644 --- a/libsignon-glib/signon-auth-session.h +++ b/libsignon-glib/signon-auth-session.h @@ -28,6 +28,7 @@ #include #include +#include G_BEGIN_DECLS @@ -162,15 +163,18 @@ void signon_auth_session_query_available_mechanisms(SignonAuthSession *self, SignonAuthSessionQueryAvailableMechanismsCb cb, gpointer user_data); +#ifndef SIGNON_DISABLE_DEPRECATED typedef void (*SignonAuthSessionProcessCb) (SignonAuthSession *self, GHashTable *session_data, const GError *error, gpointer user_data); +SIGNON_DEPRECATED_FOR(signon_auth_session_process_async) void signon_auth_session_process(SignonAuthSession *self, const GHashTable *session_data, const gchar *mechanism, SignonAuthSessionProcessCb cb, gpointer user_data); +#endif void signon_auth_session_process_async (SignonAuthSession *self, GVariant *session_data, const gchar *mechanism, diff --git a/libsignon-glib/signon-types.h b/libsignon-glib/signon-types.h new file mode 100644 index 0000000..7318baf --- /dev/null +++ b/libsignon-glib/signon-types.h @@ -0,0 +1,42 @@ +/* vi: set et sw=4 ts=4 cino=t0,(0: */ +/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of libsignon-glib + * + * Copyright (C) 2012 Canonical Ltd. + * + * Contact: Alberto Mardegan + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * version 2.1 as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA + */ + +#ifndef SIGNON_TYPES_H +#define SIGNON_TYPES_H + +#include + +G_BEGIN_DECLS + +#ifdef SIGNON_DISABLE_DEPRECATION_WARNINGS +#define SIGNON_DEPRECATED +#define SIGNON_DEPRECATED_FOR(x) +#else +#define SIGNON_DEPRECATED G_DEPRECATED +#define SIGNON_DEPRECATED_FOR(x) G_DEPRECATED_FOR(x) +#endif + +G_END_DECLS + +#endif /* SIGNON_TYPES_H */ diff --git a/tests/check_signon.c b/tests/check_signon.c index d67ffa1..70beed5 100644 --- a/tests/check_signon.c +++ b/tests/check_signon.c @@ -26,6 +26,9 @@ * @example check_signon.c * Shows how to initialize the framework. */ + +#define SIGNON_DISABLE_DEPRECATION_WARNINGS + #include "libsignon-glib/signon-internals.h" #include "libsignon-glib/signon-auth-service.h" #include "libsignon-glib/signon-auth-session.h"