[gnome-software/wip/temp/ubuntu-xenial-rebased-corrected: 18/331] Add D-Bus interfaces to Ubuntu SSO
- From: William Hua <williamhua src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/temp/ubuntu-xenial-rebased-corrected: 18/331] Add D-Bus interfaces to Ubuntu SSO
- Date: Wed, 4 May 2016 14:00:01 +0000 (UTC)
commit c388e55551ead887977b15afe927d6cc68e6f85e
Author: William Hua <william hua canonical com>
Date: Thu Jan 21 13:23:18 2016 -0600
Add D-Bus interfaces to Ubuntu SSO
configure.ac | 1 +
src/plugins/Makefile.am | 32 ++++++-
.../com.ubuntu.sso.CredentialsManagement.xml | 55 ++++++++++
src/plugins/com.ubuntu.sso.UserManagement.xml | 104 ++++++++++++++++++++
4 files changed, 191 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 76f4d3d..c578ff9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -56,6 +56,7 @@ AC_DEFINE(GETTEXT_PACKAGE, "AC_PACKAGE_NAME", [gnome-software])
AM_PATH_GLIB_2_0(2.46.0, :, AC_MSG_ERROR([GLib is required]), gobject gmodule gio)
AM_GLIB_GNU_GETTEXT
GLIB_GSETTINGS
+AC_PATH_PROG([GDBUS_CODEGEN], [gdbus-codegen])
dnl ---------------------------------------------------------------------------
dnl - Check library dependencies
diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am
index 508ff69..776fa9f 100644
--- a/src/plugins/Makefile.am
+++ b/src/plugins/Makefile.am
@@ -175,11 +175,35 @@ libgs_plugin_ubuntu_reviews_la_LDFLAGS = -module -avoid-version
libgs_plugin_ubuntu_reviews_la_CFLAGS = $(GS_PLUGIN_CFLAGS) $(WARN_CFLAGS)
endif
-libgs_plugin_ubuntu_reviews_la_SOURCES = gs-plugin-ubuntu-reviews.c
+libgs_plugin_ubuntu_reviews_la_SOURCES = \
+ gs-plugin-ubuntu-reviews.c \
+ ubuntu-sso-accounts-proxy.c \
+ ubuntu-sso-credentials-proxy.c
libgs_plugin_ubuntu_reviews_la_LIBADD = $(GS_PLUGIN_LIBS) $(SOUP_LIBS) $(JSON_GLIB_LIBS) $(OAUTH_LIBS)
$(SQLITE_LIBS)
libgs_plugin_ubuntu_reviews_la_LDFLAGS = -module -avoid-version
libgs_plugin_ubuntu_reviews_la_CFLAGS = $(GS_PLUGIN_CFLAGS) $(WARNINGFLAGS_C)
+ubuntu-sso-accounts-proxy.c: com.ubuntu.sso.UserManagement.xml
+ $(GDBUS_CODEGEN) --interface-prefix com.ubuntu.sso \
+ --generate-c-code ubuntu-sso-accounts-proxy \
+ --c-namespace UbuntuSSO \
+ --annotate 'com.ubuntu.sso.UserManagement' \
+ org.gtk.GDBus.C.Name \
+ Accounts \
+ com.ubuntu.sso.UserManagement.xml
+
+ubuntu-sso-credentials-proxy.c: com.ubuntu.sso.CredentialsManagement.xml
+ $(GDBUS_CODEGEN) --interface-prefix com.ubuntu.sso \
+ --generate-c-code ubuntu-sso-credentials-proxy \
+ --c-namespace UbuntuSSO \
+ --annotate 'com.ubuntu.sso.CredentialsManagement' \
+ org.gtk.GDBus.C.Name \
+ Credentials \
+ --annotate 'com.ubuntu.sso.CredentialsManagement.find_credentials_sync()' \
+ org.gtk.GDBus.C.Name \
+ find_credentials_and_wait \
+ com.ubuntu.sso.CredentialsManagement.xml
+
libgs_plugin_packagekit_la_SOURCES = \
gs-plugin-packagekit.c \
packagekit-common.c \
@@ -264,4 +288,10 @@ TESTS = gs-self-test
EXTRA_DIST = moduleset-test.xml
+GITIGNOREFILES = \
+ ubuntu-sso-accounts-proxy.h \
+ ubuntu-sso-accounts-proxy.c \
+ ubuntu-sso-credentials-proxy.h \
+ ubuntu-sso-credentials-proxy.c
+
-include $(top_srcdir)/git.mk
diff --git a/src/plugins/com.ubuntu.sso.CredentialsManagement.xml
b/src/plugins/com.ubuntu.sso.CredentialsManagement.xml
new file mode 100644
index 0000000..c420052
--- /dev/null
+++ b/src/plugins/com.ubuntu.sso.CredentialsManagement.xml
@@ -0,0 +1,55 @@
+<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
+"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
+<node name="/com/ubuntu/sso/credentials">
+ <interface name="com.ubuntu.sso.CredentialsManagement">
+ <signal name="CredentialsError">
+ <arg type="s" name="app_name" />
+ <arg type="a{ss}" name="error_dict" />
+ </signal>
+ <signal name="CredentialsStored">
+ <arg type="s" name="app_name" />
+ </signal>
+ <signal name="CredentialsNotFound">
+ <arg type="s" name="app_name" />
+ </signal>
+ <signal name="AuthorizationDenied">
+ <arg type="s" name="app_name" />
+ </signal>
+ <method name="register">
+ <arg direction="in" type="s" name="app_name" />
+ <arg direction="in" type="a{ss}" name="args" />
+ </method>
+ <method name="find_credentials_sync">
+ <arg direction="in" type="s" name="app_name" />
+ <arg direction="in" type="a{ss}" name="args" />
+ <arg direction="out" type="a{ss}" />
+ </method>
+ <method name="find_credentials">
+ <arg direction="in" type="s" name="app_name" />
+ <arg direction="in" type="a{ss}" name="args" />
+ </method>
+ <signal name="CredentialsCleared">
+ <arg type="s" name="app_name" />
+ </signal>
+ <method name="clear_credentials">
+ <arg direction="in" type="s" name="app_name" />
+ <arg direction="in" type="a{ss}" name="args" />
+ </method>
+ <signal name="CredentialsFound">
+ <arg type="s" name="app_name" />
+ <arg type="a{ss}" name="credentials" />
+ </signal>
+ <method name="login">
+ <arg direction="in" type="s" name="app_name" />
+ <arg direction="in" type="a{ss}" name="args" />
+ </method>
+ <method name="login_email_password">
+ <arg direction="in" type="s" name="app_name" />
+ <arg direction="in" type="a{ss}" name="args" />
+ </method>
+ <method name="store_credentials">
+ <arg direction="in" type="s" name="app_name" />
+ <arg direction="in" type="a{ss}" name="args" />
+ </method>
+ </interface>
+</node>
diff --git a/src/plugins/com.ubuntu.sso.UserManagement.xml b/src/plugins/com.ubuntu.sso.UserManagement.xml
new file mode 100644
index 0000000..e1365a3
--- /dev/null
+++ b/src/plugins/com.ubuntu.sso.UserManagement.xml
@@ -0,0 +1,104 @@
+<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
+"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
+<node name="/com/ubuntu/sso/accounts">
+ <interface name="com.ubuntu.sso.UserManagement">
+ <signal name="PasswordChanged">
+ <arg type="s" name="app_name" />
+ <arg type="s" name="result" />
+ </signal>
+ <signal name="UserRegistered">
+ <arg type="s" name="app_name" />
+ <arg type="s" name="result" />
+ </signal>
+ <signal name="EmailValidationError">
+ <arg type="s" name="app_name" />
+ <arg type="a{ss}" name="error" />
+ </signal>
+ <method name="login_and_ping">
+ <arg direction="in" type="s" name="app_name" />
+ <arg direction="in" type="s" name="email" />
+ <arg direction="in" type="s" name="password" />
+ <arg direction="in" type="s" name="ping_url" />
+ </method>
+ <signal name="PasswordResetTokenSent">
+ <arg type="s" name="app_name" />
+ <arg type="s" name="result" />
+ </signal>
+ <signal name="CaptchaGenerationError">
+ <arg type="s" name="app_name" />
+ <arg type="a{ss}" name="error" />
+ </signal>
+ <method name="request_password_reset_token">
+ <arg direction="in" type="s" name="app_name" />
+ <arg direction="in" type="s" name="email" />
+ </method>
+ <method name="validate_email">
+ <arg direction="in" type="s" name="app_name" />
+ <arg direction="in" type="s" name="email" />
+ <arg direction="in" type="s" name="password" />
+ <arg direction="in" type="s" name="email_token" />
+ </method>
+ <signal name="LoggedIn">
+ <arg type="s" name="app_name" />
+ <arg type="s" name="result" />
+ </signal>
+ <signal name="UserRegistrationError">
+ <arg type="s" name="app_name" />
+ <arg type="a{ss}" name="error" />
+ </signal>
+ <signal name="CaptchaGenerated">
+ <arg type="s" name="app_name" />
+ <arg type="s" name="result" />
+ </signal>
+ <method name="validate_email_and_ping">
+ <arg direction="in" type="s" name="app_name" />
+ <arg direction="in" type="s" name="email" />
+ <arg direction="in" type="s" name="password" />
+ <arg direction="in" type="s" name="email_token" />
+ <arg direction="in" type="s" name="ping_url" />
+ </method>
+ <signal name="EmailValidated">
+ <arg type="s" name="app_name" />
+ <arg type="s" name="result" />
+ </signal>
+ <method name="generate_captcha">
+ <arg direction="in" type="s" name="app_name" />
+ <arg direction="in" type="s" name="filename" />
+ </method>
+ <signal name="LoginError">
+ <arg type="s" name="app_name" />
+ <arg type="a{ss}" name="error" />
+ </signal>
+ <signal name="UserNotValidated">
+ <arg type="s" name="app_name" />
+ <arg type="s" name="result" />
+ </signal>
+ <signal name="PasswordResetError">
+ <arg type="s" name="app_name" />
+ <arg type="a{ss}" name="error" />
+ </signal>
+ <method name="login">
+ <arg direction="in" type="s" name="app_name" />
+ <arg direction="in" type="s" name="email" />
+ <arg direction="in" type="s" name="password" />
+ </method>
+ <signal name="PasswordChangeError">
+ <arg type="s" name="app_name" />
+ <arg type="a{ss}" name="error" />
+ </signal>
+ <method name="register_user">
+ <arg direction="in" type="s" name="app_name" />
+ <arg direction="in" type="s" name="email" />
+ <arg direction="in" type="s" name="password" />
+ <arg direction="in" type="s" name="name" />
+ <arg direction="in" type="s" name="captcha_id" />
+ <arg direction="in" type="s" name="captcha_solution" />
+ </method>
+ <method name="set_new_password">
+ <arg direction="in" type="s" name="app_name" />
+ <arg direction="in" type="s" name="email" />
+ <arg direction="in" type="s" name="token" />
+ <arg direction="in" type="s" name="new_password" />
+ </method>
+ </interface>
+</node>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]