2 * empathy-uoa-utils.c - Source for UOA utilities
3 * Copyright (C) 2012 Collabora Ltd.
4 * @author Xavier Claessens <xavier.claessens@collabora.co.uk>
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 #include "empathy-uoa-utils.h"
24 #define DEBUG_FLAG EMPATHY_DEBUG_ACCOUNT
25 #include "empathy-debug.h"
27 static AgManager *singleton = NULL;
30 empathy_uoa_manager_set_default (AgManager *manager)
32 if (singleton != NULL)
36 g_object_add_weak_pointer ((GObject *) singleton, (gpointer) &singleton);
40 empathy_uoa_manager_dup (void)
42 if (singleton != NULL)
43 return g_object_ref (singleton);
45 singleton = ag_manager_new_for_service_type (EMPATHY_UOA_SERVICE_TYPE);
46 g_object_add_weak_pointer ((GObject *) singleton, (gpointer) &singleton);