]> git.0d.be Git - empathy.git/blob - ubuntu-online-accounts/mc-plugin/mission-control-plugin.c
d7a33fd431d17c4e652ffc38be1d97135b37b2b9
[empathy.git] / ubuntu-online-accounts / mc-plugin / mission-control-plugin.c
1 /*
2  * mission-control-plugin.c
3  *
4  * A Mission Control plugin to expose Ubuntu Online Accounts with chat
5  * capabilities (e.g. Facebook) to Mission Control
6  *
7  * Copyright (C) 2012 Collabora Ltd.
8  *
9  * This library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public
11  * License as published by the Free Software Foundation; either
12  * version 2.1 of the License, or (at your option) any later version.
13  *
14  * This library is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17  * Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
21  *
22  * Authors: Xavier Claessens <xavier.claessens@collabora.co.uk>
23  */
24
25 #include <mission-control-plugins/mission-control-plugins.h>
26
27 #include "mcp-account-manager-uoa.h"
28
29 GObject *
30 mcp_plugin_ref_nth_object (guint n)
31 {
32   static void *plugin_0 = NULL;
33
34   switch (n)
35     {
36       case 0:
37         if (plugin_0 == NULL)
38           plugin_0 = g_object_new (MCP_TYPE_ACCOUNT_MANAGER_UOA, NULL);
39         else
40           g_object_ref (plugin_0);
41
42         return plugin_0;
43
44       default:
45         return NULL;
46     }
47 }