summaryrefslogtreecommitdiff
path: root/docs/examples/mission_control_plugin/mission-control-plugin.c
diff options
context:
space:
mode:
authorDanielle Madeley <danielle.madeley@collabora.co.uk>2010-09-30 09:47:23 +1000
committerDanielle Madeley <danielle.madeley@collabora.co.uk>2010-09-30 09:47:23 +1000
commit0b452791f51e34ac834fd7a4f9b4517877e82c7d (patch)
tree5b487cc313cf9c6f37d546cc7223544720b3574a /docs/examples/mission_control_plugin/mission-control-plugin.c
parent992f4fb7b0e3c734f234e6ab2284484e244211c9 (diff)
An example Mission Control plugin
Diffstat (limited to 'docs/examples/mission_control_plugin/mission-control-plugin.c')
-rw-r--r--docs/examples/mission_control_plugin/mission-control-plugin.c48
1 files changed, 48 insertions, 0 deletions
diff --git a/docs/examples/mission_control_plugin/mission-control-plugin.c b/docs/examples/mission_control_plugin/mission-control-plugin.c
new file mode 100644
index 0000000..f016acc
--- /dev/null
+++ b/docs/examples/mission_control_plugin/mission-control-plugin.c
@@ -0,0 +1,48 @@
+/*
+ * mission-control-plugin.c
+ *
+ * A Mission Control plugin to expose libsocialweb accounts with chat
+ * capabilities (e.g. Facebook) to Mission Control
+ *
+ * Copyright (C) 2010 Collabora Ltd.
+ *
+ * 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, see <http://www.gnu.org/licenses/>.
+ *
+ * Authors:
+ * Danielle Madeley <danielle.madeley@collabora.co.uk>
+ */
+
+#include <mission-control-plugins/mission-control-plugins.h>
+
+#include "mcp-account-manager-example.h"
+
+GObject *
+mcp_plugin_ref_nth_object (guint n)
+{
+ static void *plugin_0 = NULL;
+
+ if (plugin_0 == NULL)
+ plugin_0 = g_object_new (MCP_TYPE_ACCOUNT_MANAGER_EXAMPLE, NULL);
+
+ switch (n)
+ {
+ case 0:
+ return g_object_ref (plugin_0);
+ break;
+
+ default:
+ return NULL;
+ break;
+ }
+}