Commit 2627b4eb authored by Corentin Noël's avatar Corentin Noël

Doc: fix documentation and add migration guide

parent 29c0a3d5
......@@ -58,6 +58,19 @@
<xi:include href="../../libsignon-glib/sso-identity-gen-doc-com.google.code.AccountsSSO.SingleSignOn.Identity.xml"/>
</part>
<part id="migrating">
<title>Migrating from Previous Versions of libsignon-glib</title>
<partintro>
<para>
This part describes what you need to change in programs use
older versions of libsignon-glib so that they can use the new features.
</para>
</partintro>
<xi:include href="xml/migrating-1to2.xml" />
</part>
<part id="appendices">
<title>Appendices</title>
<index id="api-index-full">
......
......@@ -2,11 +2,13 @@
<FILE>signon-auth-service</FILE>
<TITLE>SignonAuthService</TITLE>
SignonAuthService
SignonQueryMechanismCb
SignonQueryMethodsCb
signon_auth_service_new
signon_auth_service_query_mechanisms
signon_auth_service_query_methods
signon_auth_service_get_mechanisms
signon_auth_service_get_mechanisms_finish
signon_auth_service_get_mechanisms_sync
signon_auth_service_get_methods
signon_auth_service_get_methods_finish
signon_auth_service_get_methods_sync
<SUBSECTION Private>
SignonAuthServiceClass
SignonAuthServicePrivate
......@@ -33,16 +35,14 @@ SIGNON_SESSION_DATA_UI_POLICY
SIGNON_SESSION_DATA_USERNAME
SIGNON_SESSION_DATA_WINDOW_ID
SignonAuthSession
SignonAuthSessionProcessCb
SignonAuthSessionQueryAvailableMechanismsCb
SignonSessionDataUiPolicy
signon_auth_session_cancel
signon_auth_session_get_method
signon_auth_session_new
signon_auth_session_process
signon_auth_session_process_async
signon_auth_session_process_finish
signon_auth_session_query_available_mechanisms
signon_auth_session_list_available_mechanisms
signon_auth_session_list_available_mechanisms_finish
<SUBSECTION Private>
SignonAuthSessionClass
SignonAuthSessionPrivate
......@@ -77,26 +77,21 @@ signon_error_get_type
<FILE>signon-identity</FILE>
<TITLE>SignonIdentity</TITLE>
SignonIdentity
SignonIdentityInfoCb
SignonIdentityReferenceAddedCb
SignonIdentityReferenceRemovedCb
SignonIdentityRemovedCb
SignonIdentitySignedOutCb
SignonIdentityStoreCredentialsCb
SignonIdentityVerifyCb
SignonIdentityVoidCb
signon_identity_add_reference
signon_identity_create_session
signon_identity_get_last_error
signon_identity_new
signon_identity_new_from_db
signon_identity_get_id
signon_identity_query_info
signon_identity_remove
signon_identity_remove_reference
signon_identity_signout
signon_identity_store_credentials_with_args
signon_identity_store_credentials_with_info
signon_identity_query_info_finish
signon_identity_store_info
signon_identity_store_info_finish
signon_identity_verify_secret
signon_identity_verify_secret_finish
signon_identity_sign_out
signon_identity_sign_out_finish
signon_identity_remove
signon_identity_remove_finish
<SUBSECTION Private>
SignonIdentityClass
SignonIdentityPrivate
......@@ -112,6 +107,7 @@ signon_identity_get_type
<SECTION>
<FILE>signon-identity-info</FILE>
<TITLE>SignonIdentityInfo</TITLE>
SignonIdentityInfo
SignonIdentityType
signon_identity_info_copy
......
......@@ -47,6 +47,9 @@ gnome.gtkdoc(
'libsignon-glib.types',
],
content_files: doc_content_files,
expand_content_files: files(
'migrating-1to2.xml'
),
fixxref_args: [
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'glib')),
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'gobject')),
......
<?xml version="1.0"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
<!ENTITY % local.common.attrib "xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'">
]>
<chapter id="signon-migrating-1-to-2">
<title>Migrating from libsignon-glib 1.x to libsignon-glib 2.x</title>
<para>
The whole API has been reworked to be easily usable with the GObject
Introspection. It now fully uses the #GTask API internally and provides
the expected asynchronous functions instead of relying on callbacks.
</para>
<para>
This helps to keep the objects lifecycle sane across the projects. But it
required some invasive changes in the API.
</para>
<section>
<title>Changes in #SignonAuthService</title>
<para>
signon_auth_service_query_mechanisms() has been changed into
signon_auth_service_get_mechanisms(). There is no more custom callback
to use, only the #GAsyncResult API. use
signon_auth_service_get_mechanisms_finish() in your #GAsyncReadyCallback
to get the mechanisms.
</para>
<para>
In a same manner signon_auth_service_query_methods() has been changed to
signon_auth_service_get_methods().
</para>
<para>
There are now synchronous methods to get the methods and mechanisms.
</para>
</section>
<section>
<title>Changes in #SignonAuthSession</title>
<para>
The long deprecated signon_auth_session_process() has been removed and
the signon_auth_session_process_async() method has been renamed to
signon_auth_session_process() as Asynchronous methods are the default
way to use this API.
</para>
</section>
<section>
<title>Changes in #SignonIdentity</title>
<para>
signon_identity_store_credentials_with_args() has been completely
removed, only signon_identity_store_info() should be used
</para>
<para>
signon_identity_store_credentials_with_info() has been renamed
to signon_identity_store_info() as #SignonIdentityInfo is the only way
to get and set the identity informations.
</para>
<para>
signon_identity_add_reference() and signon_identity_remove_reference()
have been completely removed without replacement.
</para>
<para>
The "id" property is now read-only and only settable at construction
time. there is a new signon_identity_get_id() method to easily get the
value of the property. The object now notifies when the property has
changed with a property signal emition.
</para>
<para>
The "signout" signal has been renamed to #SignonIdentity::signed-out to
be more descriptive and avoid symbol collisions with the
signon_identity_sign_out() method.
</para>
<para>
The signon_identity_signout() has been renamed to
signon_identity_sign_out() to avoid symbol collisions with the "signout"
signal.
</para>
<para>
All the methods have been modified to use the #GAsyncResult API. use
*_finish() in your #GAsyncReadyCallback to get the result of the
operation.
</para>
</section>
</chapter>
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