public ConnectionLocator() { account_manager = DBusUtility.GetProxy <IAccountManager> (bus, Constants.ACCOUNTMANAGER_IFACE, Constants.ACCOUNTMANAGER_PATH); Initialize(); }
public Connection(string bus_name, string object_path, string account_id, string account_path) { this.AccountId = account_id; this.AccountObjectPath = account_path; this.BusName = bus_name; this.ObjectPath = object_path; this.conn = DBusUtility.GetProxy <IConnection> (bus, bus_name, object_path); self_handle = (uint)DBusUtility.GetProperty(bus, bus_name, object_path, Constants.CONNECTION_IFACE, "SelfHandle"); Initialize(); }
protected virtual void OnContactListChannelReady(object sender, EventArgs args) { uint [] contacts = contact_list.GetContacts(); //Log.DebugFormat ("Account {0} has {1} contacts", conn.AccountId, contacts.Length); presence = DBusUtility.GetProxy <ISimplePresence> (conn.Bus, conn.BusName, conn.ObjectPath); GetPresenceInfo(contacts); presence.PresencesChanged += OnPresencesChanged; state = RosterState.Loaded; OnRosterStateChanged(new RosterEventArgs(state)); }
protected virtual void Initialize() { requests = DBusUtility.GetProxy <IRequests> (bus, bus_name, object_path); capabilities = DBusUtility.GetProxy <IContactCapabilities> (bus, bus_name, object_path); conn.StatusChanged += OnStatusChanged; conn.SelfHandleChanged += OnSelfHandleChanged; LoadCapabilities(); dispatch_manager = new DispatchManager(this); CreateRoster(); }
public void Close () { try { if (chann_path != null) { IChannel channel = DBusUtility.GetProxy <IChannel> (conn.Bus, conn.BusName, chann_path); // some channels can't be closed, so catch exception and log // also, channel might be cleaned up by Telepathy already, so attempting to close // may result in an exception channel.Close (); channel = null; chann_path = null; } } catch (Exception) { } }
private void Initialize() { iaccount = DBusUtility.GetProxy <IAccount> (BusType.Session, Constants.ACCOUNTMANAGER_IFACE, AccountObjectPath); iaccount.AccountPropertyChanged += OnAccountPropertyChanged; ObjectPath = GetConnectionObjectPath(); connected = !ObjectPath.Equals("/"); AccountId = (string)DBusUtility.GetProperty(BusType, Constants.ACCOUNTMANAGER_IFACE, AccountObjectPath, Constants.ACCOUNT_IFACE, "NormalizedName"); }
//private delegate void EnsureChannelCaller (IDictionary <string, object> specs, out bool yours, out ObjectPath path, out IDictionary <string, object> properties); public override void Request() { IDictionary <string, object> channel_specs = new Dictionary <string, object> (); channel_specs.Add(Constants.CHANNEL_IFACE + ".ChannelType", ChannelType); channel_specs.Add(Constants.CHANNEL_IFACE + ".TargetHandleType", HandleType.List); channel_specs.Add(Constants.CHANNEL_IFACE + ".TargetID", this.target_id); bool yours = false; ObjectPath object_path = null; Requests.EnsureChannel(channel_specs, out yours, out object_path, out channel_properties); this.ChannPath = object_path.ToString(); group = DBusUtility.GetProxy <IGroup> (Connection.Bus, Connection.BusName, ChannPath); group.MembersChanged += OnMembersChanged; OnChannelReady(EventArgs.Empty); }
internal protected Avatar(Contact contact) : this() { this.contact = contact; avatars = DBusUtility.GetProxy <IAvatars> (Connection.Bus, Connection.BusName, Connection.ObjectPath); }
protected override void SetProxyObject() { ft = DBusUtility.GetProxy <IFileTransfer> (Connection.BusName, ObjectPath); }
protected override void SetProxyObject() { tube = DBusUtility.GetProxy <IDBusTube> (Connection.BusName, ObjectPath); }