aboutsummaryrefslogtreecommitdiff
path: root/src/main.vala
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.vala')
-rw-r--r--src/main.vala34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/main.vala b/src/main.vala
new file mode 100644
index 0000000..caee3b3
--- /dev/null
+++ b/src/main.vala
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2013 Canonical Ltd.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 3.
+ *
+ * This program 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 program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * Authors:
+ * Charles Kerr <charles.kerr@canonical.com>
+ */
+
+public static int main (string[] args)
+{
+ // set up i18n
+ Intl.bind_textdomain_codeset (Config.GETTEXT_PACKAGE, "UTF-8");
+ Intl.setlocale (LocaleCategory.ALL, "");
+ Intl.bindtextdomain (Config.GETTEXT_PACKAGE, Config.GNOMELOCALEDIR);
+ Intl.textdomain (Config.GETTEXT_PACKAGE);
+
+ // create the backend
+ var bluetooth = new Bluez (new RfKillSwitch ());
+
+ // start the service
+ var service = new Service (bluetooth);
+ return service.run ();
+}