uoa_sources = \
empathy-uoa-auth-handler.c \
empathy-uoa-auth-handler.h \
- empathy-uoa-utils.c \
- empathy-uoa-utils.h \
$(NULL)
pkglib_LTLIBRARIES = libempathy.la
#include <libsignon-glib/signon-auth-session.h>
#include <tp-account-widgets/tpaw-keyring.h>
+#include <tp-account-widgets/tpaw-uoa-utils.h>
#include "empathy-utils.h"
-#include "empathy-uoa-utils.h"
#include "empathy-sasl-mechanisms.h"
#define DEBUG_FLAG EMPATHY_DEBUG_SASL
+++ /dev/null
-/*
- * empathy-uoa-utils.c - Source for UOA utilities
- * Copyright (C) 2012 Collabora Ltd.
- * @author Xavier Claessens <xavier.claessens@collabora.co.uk>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * 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
- */
-
-#include "config.h"
-#include "empathy-uoa-utils.h"
-
-#define DEBUG_FLAG EMPATHY_DEBUG_ACCOUNT
-#include "empathy-debug.h"
-
-static AgManager *singleton = NULL;
-
-void
-empathy_uoa_manager_set_default (AgManager *manager)
-{
- if (singleton != NULL)
- return;
-
- singleton = manager;
- g_object_add_weak_pointer ((GObject *) singleton, (gpointer) &singleton);
-}
-
-AgManager *
-empathy_uoa_manager_dup (void)
-{
- if (singleton != NULL)
- return g_object_ref (singleton);
-
- singleton = ag_manager_new_for_service_type (EMPATHY_UOA_SERVICE_TYPE);
- g_object_add_weak_pointer ((GObject *) singleton, (gpointer) &singleton);
-
- return singleton;
-}
+++ /dev/null
-/*
- * empathy-utils.h - Header for UOA utilities
- * Copyright (C) 2012 Collabora Ltd.
- * @author Xavier Claessens <xavier.claessens@collabora.co.uk>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * 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 __EMPATHY_UOA_UTILS_H__
-#define __EMPATHY_UOA_UTILS_H__
-
-#include <libaccounts-glib/ag-manager.h>
-
-#define EMPATHY_UOA_SERVICE_TYPE "IM"
-
-G_BEGIN_DECLS
-
-void empathy_uoa_manager_set_default (AgManager *manager);
-AgManager *empathy_uoa_manager_dup (void);
-
-G_END_DECLS
-
-#endif /* #ifndef __EMPATHY_UOA_UTILS_H__*/
$(libtp_account_widgets_headers) \
$(NULL)
+# these are sources that depend on Ubuntu Online Accounts
+uoa_sources = \
+ tpaw-uoa-utils.c \
+ tpaw-uoa-utils.h \
+ $(NULL)
+
+if HAVE_UOA
+libtp_account_widgets_la_SOURCES += $(uoa_sources)
+EXTRA_DIST =
+else
+EXTRA_DIST = $(uoa_sources)
+endif
+
# do not distribute generated files
nodist_libtp_account_widgets_la_SOURCES = \
$(BUILT_SOURCES)
check_c_sources = \
$(libtp_account_widgets_sources) \
$(libtp_account_widgets_headers) \
+ $(uoa_sources) \
$(NULL)
include $(top_srcdir)/tools/check-coding-style.mk
check-local: check-coding-style
tpaw-account-widgets-resources.h: tpaw-account-widgets.gresource.xml $(account_widgets_resource_files)
$(AM_V_GEN)$(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-header $<
-EXTRA_DIST = \
+EXTRA_DIST += \
tpaw-account-widgets.gresource.xml \
$(account_widgets_dtd_files) \
$(account_widgets_ui_files) \
#include <libaccounts-glib/ag-manager.h>
#include <libaccounts-glib/ag-service.h>
#include <libsignon-glib/signon-identity.h>
-#include "empathy-uoa-utils.h"
+#include "tpaw-uoa-utils.h"
#endif
#include "empathy-utils.h"
goto error;
}
- manager = empathy_uoa_manager_dup ();
+ manager = tpaw_uoa_manager_dup ();
account = ag_manager_get_account (manager, account_id);
/* Assuming there is only one IM service */
- l = ag_account_list_services_by_type (account, EMPATHY_UOA_SERVICE_TYPE);
+ l = ag_account_list_services_by_type (account, TPAW_UOA_SERVICE_TYPE);
if (l == NULL)
{
g_simple_async_result_set_error (result,
--- /dev/null
+/*
+ * tpaw-uoa-utils.c - Source for UOA utilities
+ * Copyright (C) 2012 Collabora Ltd.
+ * @author Xavier Claessens <xavier.claessens@collabora.co.uk>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * 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
+ */
+
+#include "config.h"
+#include "tpaw-uoa-utils.h"
+
+#define DEBUG_FLAG EMPATHY_DEBUG_ACCOUNT
+#include "empathy-debug.h"
+
+static AgManager *singleton = NULL;
+
+void
+tpaw_uoa_manager_set_default (AgManager *manager)
+{
+ if (singleton != NULL)
+ return;
+
+ singleton = manager;
+ g_object_add_weak_pointer ((GObject *) singleton, (gpointer) &singleton);
+}
+
+AgManager *
+tpaw_uoa_manager_dup (void)
+{
+ if (singleton != NULL)
+ return g_object_ref (singleton);
+
+ singleton = ag_manager_new_for_service_type (TPAW_UOA_SERVICE_TYPE);
+ g_object_add_weak_pointer ((GObject *) singleton, (gpointer) &singleton);
+
+ return singleton;
+}
--- /dev/null
+/*
+ * tpaw-utils.h - Header for UOA utilities
+ * Copyright (C) 2012 Collabora Ltd.
+ * @author Xavier Claessens <xavier.claessens@collabora.co.uk>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * 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 __TPAW_UOA_UTILS_H__
+#define __TPAW_UOA_UTILS_H__
+
+#include <libaccounts-glib/ag-manager.h>
+
+#define TPAW_UOA_SERVICE_TYPE "IM"
+
+G_BEGIN_DECLS
+
+void tpaw_uoa_manager_set_default (AgManager *manager);
+AgManager *tpaw_uoa_manager_dup (void);
+
+G_END_DECLS
+
+#endif /* #ifndef __TPAW_UOA_UTILS_H__*/