2 using System
.Collections
.Generic
;
7 public delegate void ContactModelChangedDelegate ();
12 Just a cache of stuff on the telepathy side really.
14 public class ContactModel
17 ConnectionModel connection_model
;
21 IDictionary
<string, IDictionary
<string, object>> presence_items
;
23 Widget
.ConversationWindow conversation_window
;
24 IChannelText text_channel
;
26 public ContactModel (ConnectionModel _connection_model
, uint _handle
)
29 connection_model
= _connection_model
;
34 get { return handle; }
42 string[] names
= connection_model
.Connection
.InspectHandles (HandleType
.Contact
, new uint[] {handle}
);
49 public ConnectionModel ConnectionModel
51 get { return connection_model; }
54 public Widget
.ConversationWindow ConversationWindow
58 if (conversation_window
== null)
60 conversation_window
= new Widget
.ConversationWindow (this);
62 return conversation_window
;
66 public void SetTextChannel (IChannelText _text_channel
)
68 if (text_channel
!= null)
70 // fixme: dispose of old channel
73 text_channel
= _text_channel
;
74 this.ConversationWindow
.SetChannelText (text_channel
);
85 //ALP FIXME alias = conn_model.Connection.RequestAlias (handle);
90 set { alias = value; FireUpdated (); }
93 public IDictionary<string, IDictionary<string, object>> PresenceItems
97 if (presence_items == null) {
98 presence_items = new Dictionary<string, IDictionary<string, object>> ();
99 presence_items.Add (new KeyValuePair<string, IDictionary<string, object>> ("offline", null));
102 return presence_items;
104 set { presence_items = value; FireUpdated (); }
109 if (Updated != null) Updated (this, null);
112 public event ContactModelChangedDelegate Changed
;