~unity-team/unity-lens-video/saucy

101.2.15 by Pawel Stolowski
First cut at the remote video scope.
1
/*
2
 * Copyright (C) 2012 Canonical Ltd
3
 *
4
 * This program is free software: you can redistribute it and/or modify
5
 * it under the terms of the GNU General Public License version 3 as
6
 * published by the Free Software Foundation.
7
 *
8
 * This program is distributed in the hope that it will be useful,
9
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11
 * GNU General Public License for more details.
12
 *
13
 * You should have received a copy of the GNU General Public License
14
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
15
 */
16
17
using GLib;
18
using Config;
19
20
namespace Unity.VideoLens {
21
22
  public static int main (string[] args)
23
  {
24
    GLib.Environment.set_prgname ("unity-remote-video-scope");
25
26
    /* Sort up locale to get translations but also sorting and
27
     * punctuation right */
28
    GLib.Intl.textdomain (Config.PACKAGE);
29
    GLib.Intl.bindtextdomain (Config.PACKAGE, Config.LOCALEDIR);
30
    GLib.Intl.bind_textdomain_codeset (Config.PACKAGE, "UTF-8");
31
    GLib.Intl.setlocale(GLib.LocaleCategory.ALL, "");
32
120.1.2 by Michal Hruby
Move away from deprecated scope API
33
    var scope = new RemoteVideoScope ();
34
    var exporter = new Unity.ScopeDBusConnector (scope);
101.2.15 by Pawel Stolowski
First cut at the remote video scope.
35
    try
36
    {
120.1.2 by Michal Hruby
Move away from deprecated scope API
37
      exporter.export ();
38
    }
39
    catch (GLib.Error e)
40
    {
41
      error ("Cannot export scope to DBus: %s", e.message);
42
    }
43
    Unity.ScopeDBusConnector.run ();
44
45
    return 0;
101.2.15 by Pawel Stolowski
First cut at the remote video scope.
46
  }
47
48
} /* namespace */