~elementary-apps/cable/pastebin

« back to all changes in this revision

Viewing changes to src/Irc/Irc.vala

  • Committer: eduardgotwig at gmail
  • Author(s): Julien Spautz
  • Date: 2013-08-12 16:44:37 UTC
  • mfrom: (79.1.37 model-view)
  • Revision ID: eduardgotwig@gmail.com-20130812164437-wlojp66wpptckn96
Merged  lp:~julien-spautz/cable/model-view 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***
 
2
    Copyright (C) 2013 Cable Developers
 
3
 
 
4
    This program or library is free software; you can redistribute it
 
5
    and/or modify it under the terms of the GNU Lesser General Public
 
6
    License as published by the Free Software Foundation; either
 
7
    version 3 of the License, or (at your option) any later version.
 
8
 
 
9
    This library is distributed in the hope that it will be useful,
 
10
    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 
12
    Lesser General Public License for more details.
 
13
 
 
14
    You should have received a copy of the GNU Lesser General
 
15
    Public License along with this library; if not, write to the
 
16
    Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 
17
    Boston, MA 02110-1301 USA.
 
18
***/
 
19
 
 
20
/**
 
21
 * Namespace for all IRC backend related classes.
 
22
 */
 
23
namespace Cable.Irc {
 
24
 
 
25
    /**
 
26
     * Static reference to the maki interface.
 
27
     */
 
28
    Maki client = null;
 
29
    
 
30
    public void init () {
 
31
        if (client == null) {
 
32
            try {
 
33
                client = Bus.get_proxy_sync (GLib.BusType.SESSION, "de.ikkoku.sushi", "/de/ikkoku/sushi");
 
34
            } catch (GLib.IOError error) {
 
35
                warning (error.message);
 
36
            }
 
37
            
 
38
            debug ("Successfully connected to Sushi dbus session.\n");
 
39
        }
 
40
        
 
41
        Server.init ();
 
42
    }
 
43
}