Effectively deprecate signon_auth_session_process
authorAlberto Mardegan <alberto.mardegan@canonical.com>
Fri, 30 Nov 2012 07:37:07 +0000 (09:37 +0200)
committerAlberto Mardegan <alberto.mardegan@canonical.com>
Fri, 30 Nov 2012 07:38:19 +0000 (09:38 +0200)
docs/reference/Makefile.am
docs/reference/libsignon-glib-sections.txt
libsignon-glib/Makefile.am
libsignon-glib/signon-auth-session.h
libsignon-glib/signon-types.h [new file with mode: 0644]
tests/check_signon.c

index 1e2490c8411054a244267bc1c35023c518fd26a8..ee9ca131bfb6abc85504c88f164f831e2e43732b 100644 (file)
@@ -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
index dfe5401ce759621322a280b15d944ee6eb7d284e..2807dbb5de1a1d23b085714779ed9bc4c23bae08 100644 (file)
@@ -46,6 +46,10 @@ signon_auth_session_query_available_mechanisms
 <SUBSECTION Private>
 SignonAuthSessionClass
 SignonAuthSessionPrivate
+SIGNON_DEPRECATED
+SIGNON_DEPRECATED_FOR
+G_DEPRECATED
+G_DEPRECATED_FOR
 <SUBSECTION Standard>
 SIGNON_AUTH_SESSION
 SIGNON_AUTH_SESSION_CLASS
index ec49da15e3583bcef9e47ab922c6d9032c6c60e6..e2081015950b2e4f568c48e3fc9eca0b8eeded5d 100644 (file)
@@ -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;
index caccce3f1d5e25ed9b8fac0daa47880987b2d876..18bbcb33cce886301f32a21ca1a90a67360de10a 100644 (file)
@@ -28,6 +28,7 @@
 
 #include <gio/gio.h>
 #include <glib-object.h>
+#include <libsignon-glib/signon-types.h>
 
 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 (file)
index 0000000..7318baf
--- /dev/null
@@ -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 <alberto.mardegan@canonical.com>
+ *
+ * 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 <glib.h>
+
+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 */
index d67ffa1b4a44b5611139bc3fc1e03dcd80d928aa..70beed525810a16f235a296022ed2b4d42d75e15 100644 (file)
@@ -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"