Disable AudioComponent do get everything to build nicely.
[chatter.git] / Compat.cs
blob75f0597f67763c16123959eecaaa27e04d366487
1 using System;
2 using NDesk.DBus;
4 namespace Telepathy
6 public class ConnectionManager
7 {
8 public const string JabberService = "org.freedesktop.Telepathy.ConnectionManager.gabble";
9 public const string JabberPath = "/org/freedesktop/Telepathy/ConnectionManager/gabble";
11 public const string MsnService = "org.freedesktop.Telepathy.ConnectionManager.msn";
12 public const string MsnPath = "/org/freedesktop/Telepathy/ConnectionManager/msn";
14 public static IConnectionManager FromProtocol (string protocol)
16 BusG.Init ();
17 Connection conn = NDesk.DBus.Bus.Session;
19 if (protocol == "jabber" || protocol == "google-talk")
20 return conn.GetObject<IConnectionManager> (JabberService, new ObjectPath (JabberPath));
22 if (protocol == "msn")
23 return conn.GetObject<IConnectionManager> (MsnService, new ObjectPath (MsnPath));
25 throw new Exception ("Unsupported protocol");
28 public static class PresenceStr
30 public const string Available = "available";
31 public const string Brb = "brb";
32 public const string Busy = "busy";
33 public const string Dnd = "dnd";
34 public const string ExtendedAway = "xa";
35 public const string Hidden = "hidden";
36 public const string Offline = "offline";